*How to disable your WordPress plugin directly in database?


Hmm, fews days ago I got a big trouble while login to the site event if every credentials and reCAPTCHA value is correctly provided but I never had a chance to access to the admin panels.


I always got the message saying that:


It is strange because I have used this plugin Google Captcha (reCAPTCHA) by BestWebSoft since the beginning of website deployment and I have never had any trouble like what I had right now. With this, I have no ways to access to my website back-end to add more posts and comments back to all of your inquiries. It is a frustrate situation because I can do nothing to my home page as administration part of the WordPress can not be accessible due to authenticate error.

After relaxing awhile then finally, I found that we can only do manually disable the plugin either in PHP code or in database MySQL. Luckily, I have full right to access on both FTP and MySQL on hosting so, it is not very complicate to disable it if I knew the points where that plugin value are setting in the database. I preferred to do it via database rather then PHP code because it would take less time to understand the structure then scripting languages used.

Please backup your database and/or your files/folders before making any change. This can solve to restore back the website in case of any problem happen un-expected.

You can use whatever GUI to access to your database back end (MySQL). For my case, I used phpMyAdminprovided by my web hosting server. The plugin configuration is stored in a table called wp_options. Now, let try to look for active plugins with the following sql statement.

SELECT * FROM `wp_options` WHERE  option_name = 'active_plugins';

You should got something similar like this in your result set.


Here is exactly what my option_value are in my setting


As you see, I have had 7 plugin enables in system. But what I would like to do now is to disable is google-captcha. To do so, I need to change the value a:7: to a:6:. Means that only 6 plugin will be enable. Then remove i:2;s:33:"google-captcha/google-captcha.php"; from the field.

Finally, the my option_value is presented like this


Once the change is updated to the database, then at login page, I see no more reCAPTCHA module embedded anymore. So I can passed through administration back-end of my homepage with only username, password, and no more Captcha validation. The selected plugin is now disabled. You can re-enable it again via Plugins tools of the WordPress. Disabling does not mean deleted it, it is just temporary block their activity.

Bravo! Finally everything is returning back as normal. I can manage my posts again ๐Ÿ™‚

12 thoughts to “*How to disable your WordPress plugin directly in database?”

  1. Thanks so much. I missed the cutoff for recaptcha expiring and it locked me out completely. I was able to use this to disable the lines and now things are back to normal. Many thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *