How to clear lockouts from the awesome Limit Login Attempts plugin via SQL

Ever used the Limit Login Attempts plugin to help safeguard against attacks? I usually find this installed on managed hosts like Pressidium and Flywheel and it’s a very nice plugin and does a solid job.

Unfortunately, I get blocked by it now and then which is, admittedly, my own fault as I’m either logging in with the incorrect deets or I failed to configure the plugin to function correctly behind a proxy like Cloudflare. Regardless, when it does get me, it gets me good because it tells me to wait for 20 minutes which drives me nuts.

Fortunately, if you have access to the database, you can totally clear the lockouts in a jiffy using a simple line of SQL. You can run this from phpMyAdmin too so if you have that on a live server, you’re in business.

Clearing all lockouts for the Limit Login Attempts plugin

It’s super simple and basically just empties a value in the wp_options table. Here’s what you need:

UPDATE wp_options SET option_value = '' WHERE option_name = 'limit_login_lockouts' LIMIT 1;

What if you only want to unblock your own IP?

The SQL above will unblock all blocked IP addresses so you are technically allowing anyone who is temporarily blocked to have another go at your server. Not really a big deal and I wouldn’t worry about it much but if you really must only target your own IP address, you can do that too:

UPDATE wp_options SET option_value = REPLACE(option_value, '111.222.333.444, '') WHERE option_name = 'limit_login_lockouts' LIMIT 1;

Obviously, you’ll want to swap out the IP address in the above with your own!

Got a project? Let's talk.

From website design & SEO through to custom WordPress plugin development. I transform ideas into dynamic, engaging, and high-performing solutions.
Subscribe to get the latest insights & updates in the world of web and how it impacts your business and website.
© 2024 Phil Kurth  |  All rights reserved.