Disable WordPress Plugin by phpMyAdmin MySQL Database

When you install new or unpopular WordPress plugins, there is always a chance that these broken or bad plugins can crash your WordPress site or have conflict with one another. Or your site may break when you upgrade the WordPress versions which are incompatible with your earlier plugins. It is easy to panic when faulty plugins kill your familiar WordPress site’s administrative dashboard, because there is no way for you to turn off or disable the crashing plugins via the usual method via wp-admin.

However, one of the easiest method to disable bad WordPress plugins manually is through manipulating MySQL database entries with phpMyAdmin. This method is the easiest and user friendly for the average webmasters. You do not need any advanced database nor command line knowledge.

Now we will go over the steps in detail with screenshots to walk you how to disable WordPress Plugins straight from database using phpMyAdmin without admin access.

Access phpMyAdmin via Cpanel Interface

Most of the web hosting provider’s Cpanel installation let you have access to the MySQL database using phpMyAdmin. Login to Cpanel and find phpMyAdmin function typically found under “database”.

Wordpress PHPMyAdmin Database

Find Active_Plugins Database Entry

The enabled or active plugins are controlled via the wp_options entry in your WordPress database. Depending on your version of phpMyAdmin, your screen shot may look different, however the entries should be similar and easy to find.

First select your main WP database, go into wp_options, then look for the entry active_plugins. The entry is usually around option_id 30+ lines. So you may have to scroll a few pages to find it. Click on edit to start editing this database entry.

Wordpress PHPMyAdmin Database Option Active Plugin

How to Disable All WordPress Plugins Instantly Manually

Now you will see a string or a serial of database entries within the active_plugin database entry. Depending on the actual plugins installed on your WordPress website setup, the string of data that you see may differ.

Precaution: Before you start editing this string of database entry, we recommend you to first copy and paste this active_plugin information to your favorite word processing tool like word or text editor. As you may need it to enable single WP plugins if needed.


Simply replace that database entry with a:0:{} to disable all WordPress plugins manually. Then click “Go” to save the new entry to deactivate all the WP plugins.

Wordpress Disable Plugin From Database

Note: If you make a mistake here by editing the database entry with syntax error, WordPress system will automatically turn off all plugins by defaulting to “a:0:{}”

How to Disable Single Plugins from WordPress Database

If you did copy the original string of database entry, you are able to disable single plugs without wp-admin via the database manipulation. What you do is simply remove the active plugins from the string of data serial. We will use the example to illustrate how to do it. In this example, we will deactivate the “anti-spam” plugin.

There are two parts to this serialized string.

The first part is how many active plugins are there. It is denoted as a:5:{…. This means that there are 5 activated plugins, to disable 1. Change a:5… into a:4…

The second part is the serial numbers of each of the plugins, it is denoted after i:0, i:1, etc. They have to be in order. In this example, we will remove the string: “i:0;s:23:”anti-spam/anti-spam.php”;”. Then we replace the 1 into 0, 2 into 1, 3 into 2.

Before: The original string with all plugins activated.

After: The final product will look like this, after deactivating the database entry for anti-spam.

After you save the data entry, reload the wordpress admin panel for the plugins to see that the plugin has been deactivated.
Wordpress Deactivate Single Plugin via Database

Special Note on Traffic and Load Heavy Sites

Being able to manually enable or disable plugins without wp-admin can be important for traffic heavy sites. Sometimes if you deactivate all the plugins including the usual W3 Total Cache or Super Cache, the traffic load from uncached pages can actually crash your WordPress Site as well.

So sometimes it is important to manually activate or let your cache plugin to stay activated instead of disabling everything. This is another reason why it is important for you to save your default entry before you start disabling all the plugins.

Leave a Reply

Your email address will not be published.