Disable WordPress plugins through phpMyAdmin

by Admin on June 16, 2009

Welcome back!

Google Buzz

I recently encountered some problem with my WordPress blog after updating it to version 2.8. Due to this update, the plugins also needed to be updated. So, while doing that, there was some problem and my blog wasn’t ready to open. So, I thought of disabling all the plugins and start over again.

But, my admin page was also not opening. So, I searched for methods that would disable plugins without logging in to WP-Admin.

I found out that the plugins could be disabled through phpMyAdmin.

Here are the steps to disable plugins through phpMyAdmin:

Login to phpMyAdmin:

phpmyadmin
This can be done through cPanel.

Browse to your blog’s database:

phpmyadmin

By default, you will be in Structure tab. Switch on to SQL tab, which is besides Structure tab.

phpmyadmin

Run SQL Query:

Navigate to the “active_plugins” column of the “wp_options” table using the following SQL query (edit the default WordPress table prefix “wp_” if needed):

SELECT * FROM wp_options WHERE option_name = 'active_plugins';

phpmyadmin

Once the active_plugins column appears, click to edit it. You will see something similar to the following, depending on the number and type of plugins you have installed:

phpmyadmin

a:26:{i:0;s:19:"akismet/akismet.php";i:1;s:43:"all-in-one-seo-pack/all_in_one_seo_pack.php";i:2;s:25:"blog-stats/blog-stats.php";i:3;s:14:"copyescape.php";i:4;s:31:"dd-formmailer/dd-formmailer.php";i:5;s:36:"google-sitemap-generator/sitemap.php";i:6;s:32:"login-lockdown/loginlockdown.php";i:7;s:18:"mybloglog_wp_2.php";i:8;s:33:"related-sites/RelatedWebsites.php";i:9;s:21:"sociable/sociable.php";i:10;s:23:"statpress/statpress.php";i:11;s:23:"tweetmeme/tweetmeme.php";i:12;s:27:"tweetmyblog/tweetmyblog.php";i:13;s:37:"twittercounter/ald-twittercounter.php";i:14;s:53:"what-would-seth-godin-do/what_would_seth_godin_do.php";i:15;s:17:"wp-ban/wp-ban.php";i:16;s:29:"wp-dbmanager/wp-dbmanager.php";i:17;s:21:"wp-email/wp-email.php";i:18;s:43:"wp-google-analytics/wp-google-analytics.php";i:19;s:27:"wp-imagefit/wp-imagefit.php";i:20;s:61:"wp-limit-posts-automatically/wp-limit-posts-automatically.php";i:21;s:27:"wp-pagenavi/wp-pagenavi.php";i:22;s:29:"wp-postviews/wp-postviews.php";i:23;s:33:"wp-security-scan/securityscan.php";i:24;s:21:"wp-table/wp-table.php";i:25;s:31:"wp-useronline/wp-useronline.php";}

That entire array of code represents every active plugin on your site. Thus, to quickly disable all plugins without using the WP Admin area, highlight the entire block of code, cut it out, and paste it into a safe, offline text file. After removing the code, click the button to save your changes and that’s it. All WordPress plugins are now deactivated (yet still installed, and with all plugin options intact). This obviously is a huge time-saver that really comes in handy during those mission-critical, time-sensitive situations where every second counts. Once you are ready to re-activate your entire set of plugins, simply cut/copy & paste the preserved code back into the “active_plugins” field. Click save and done. Again, don’t forget to backup your database before editing it ;)

Alternately, here is a one-second query to disable all plugins:

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

Upon execution, this query will clear the active_plugins field of all active plugins, effectively disabling (without uninstalling or modifying) the entire set. This method is great if you plan on re-enabling each plugin individually, say, after resolving some heinous server error. Whereas the previous technique makes it easy to re-enable all plugins en masse, this query is perfect for simply “nuking” all active plugins with no remorse. ;)


Related Posts
Related Websites

{ 1 trackback }

Review of WordPress Plugin Development | Services For Seo
May 18, 2010 at 12:25 pm

{ 6 comments… read them below or add one }

sutenm@gmail.com June 20, 2009 at 12:02 am

Thank toy for information.

Lemonade diet January 3, 2010 at 10:41 pm

Nice information. Thank a lot..

Jason Koertge February 10, 2010 at 7:19 pm

I just wrote a post on how to do this for our readers. This is exactly how I did it. Great post. I love the alternative command you provide – learned something new! Love it!

Lanre February 28, 2010 at 7:40 am

Thank you so much, I used to have the same issue, I was worried for weeks. Thanks again for making this knowledge available for others.

GunturAF June 28, 2010 at 7:19 am

thanks for your article! this is very very help me when yesterday I get stuck with Admin SSL plugin where causing I can’t accessing my wp-admin page.

thank you very much! :)

Career Outlook August 13, 2010 at 8:50 pm

Its a very useful post though I am not much techie but you explained it very well.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: