Deactivate WordPress plugins and themes from phpMyAdmin

Sometimes plugin or theme conflicts can disable a WordPress site. Often, renaming the plugin folder can get your site back up, but if you don’t have access to the file system, it’s kinda tough to rename that folder! If you have access to the database though, you can try using phpMyAdmin to disable the plugins and/or theme.

Here’s a walk-through for that.

The Details

You’ll need to ensure you’re logged in to phpMyAdmin. If you’re not sure how to access that, you can ask your web host. They’ll usually provide a help page for it.

Once logged in to phpMyAdmin, you can switch the current theme as follows.

Select your main WordPress table.

phpMyAdmin - Select WP table

Select the wp_options table (the name might be different depending on how you or your web host has configured it but wp_options is the most common and default name).

phpMyAdmin - Select wp_options table

Click the Search tab.

phpMyAdmin - Search tab

Replace ‘template’ option

In the options name field, type ‘template‘ and press Enter (or press the Go button).

phpMyAdmin - Search for 'template'

You’ll then see a list of results, there should be just one item there with the option_name ‘template’. Locate the ‘option_value‘ column and double-click that value.

phpMyAdmin - Search results - Edit option_value

Replace that value with ‘twentyfifteen‘ and press Enter.phpMyAdmin - Search and replace template value

That will set the theme to Twenty Fifteen, which is the best current starting point for trouble shooting.

REPLACE ‘stylesheet’ OPTION

Now, do that once more for the stylesheet. Click the Search tab and in the option_name field, type ‘stylesheet‘ and press Enter.

In the search results, change the option_value to ‘twentyfifteen‘.

REPLACE ‘active_plugins’ OPTION

We’ll do that just one more time, for the active plugins. Click the Search tab again and in the option_name field, type ‘active_plugins‘ and press Enter.

The option_value for that one should look rather cryptic. Simply select and delete it all and press Enter.

phpMyAdmin - Search and replace 'active_plugins'

That will deactivate all the plugins on your site.

 

 

That’s it!

With that done, assuming the trouble on your site was due to a plugin or theme conflict of some sort, you should be able to access your site once more.

To help with the troubleshooting, here’s a very helpful flowchart: http://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png

Which reminds me, if it’s still presenting trouble, or if you’d just rather not bother with it yourself, I’d recommend checking with these guys: https://premium.wpmudev.org/

WPMU DEV provides extensive, professional support services for the WordPress platform, backed by many years of experience (they’re the same people behind Edublogs.org).

Cheers! 🙂

Advertisements
Deactivate WordPress plugins and themes from phpMyAdmin

5 thoughts on “Deactivate WordPress plugins and themes from phpMyAdmin

    1. You’re most welcome! Incidentally, I make these guides more for myself, thus the huge screenshots with obvious arrows pointing to key points. I’m one of those people who easily misses things otherwise. 😀

      Really glad the guide helped in your case too and thanks for letting me know. 🙂

      Cheers!

  1. Martine says:

    Hi, I have deleted plugins via my WordPress dashboard. I also use a plugin “WP-Sweep and I must say have noticed a difference. However I have the impression after looking at my database via myphpadmin that some data still remains regarding those deleted plugins. How do I determine what more if any I could delete. Thanks in advance MC

    1. Hi @Martine, I’m terribly sorry I missed this! I must have completely missed the email alerting me about this comment, my sincere apologies for that.

      WP Sweep seems great for cleaning up many items but for old plugins that leave content in the database, it can often take a bit of sleuthing. Plugins will typically add options to the wp_options table or create new tables of their own.

      For plugins that create their own tables, you can give this a try:
      https://wordpress.org/plugins/plugins-garbage-collector/

      That plugin, as well as other helpful plugins and information about them, is discussed in this article:
      http://wpsites.net/wordpress-tips/cleaning-up-left-over-plugin-database-tables/

      In my own search, that article seems to be the most up to date and useful in regard to plugin removal and also mentions one of the more recent commercial plugins that can be incredibly helpful if you don’t wish to go digging deeply in the database.

      Just to mention too, here’s a great, if not slightly older, article on general optimization:
      https://premium.wpmudev.org/blog/optimizing-your-wordpress-database-a-complete-guide/

      Hope that helps. I’ll do my best to get to any followup questions if you have any.

      Cheers, David

      1. Oh, I just wanted to add to this, something I thought about a while back. A plugin could relatively easily be made that searches the source code of other plugins in order to find the functions it uses to create database entries. It could then offer to remove only those entries. I’m not aware of any plugins that do this currently but I really think it would be the easiest way to cleanup old plugin data.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s