Deactivating Wordpress Plugins using PHPMyAdmin

working handThe simplest way to deactivate a plugin is through your WP Admin Dashboard, but any one of the following situations may block you out from accessing the dashboard:

• After installing a plugin you suddenly get a blank white screen when accessing your WordPress dashboard

• After editing the .php file of a certain plugin an error occurred so you can no longer access the dashboard

• When you install a buggy WordPress plugin that locks you out from the dashboard

When you encounter any of the following situations, knowledge on how to delete a WordPress plugin through phpMyAdmin becomes handy. Here’s how to do it:

1. Login to your website’s CPanel.

2.  Access the phpMyAdmin interface which is normally located in the “Database” section of your CPanel.

3. Login to your phpMyAdmin account using your account details. If you haven’t setup your login details you can do so in your CPanel.

4. Upon logging in to phpMyAdmin, click on your WordPress database name (located on the left-hand side of the window).

5. After clicking the WordPress database, a list of all WordPress tables will be displayed on your screen.

6. Click on the “SQL” tab.

7. You will then be prompted to run an SQL command. You will need to type in a command that would display all the list of all active plugins.  Here’s the command that you should type in the text area:

SELECT *FROM wp_options WHERE option_name = 'active_plugins';

Click “Go” t run the command.

8. Click on the “Edit” link on the upper middle-left portion of the window to view the output of the command.

The code should look something like this:

a:4:
 {
i:0; s:23: ”NameOfFirstPlugin/PluginOne.php”;
i:1; s:25: ”NameOfSecondPlugin/PluginTwo.php”;
 i:2; s:43; ”NameOfThirdPlugin/PluginThree.php”;
 i:3; s:27: ”NameOfFourthPlugin/PluginFour.php”;
}

The line outside the curly brackets indicates the total number of active plugins installed, in this example we have 4. Each plugin is listed in numbered order from i:0 to i:n-1 where n is the total number of active plugins. In the example  above we have plugin one is numbered i:0, plugin two numbered i:1, plugin three numbered i:2 and plugin four, i:3.

9. If you want to deactivate all active plugins in your WordPress site you just need to delete the entire entry and then click “Go” to save your changes.  Note, save the entry first in your notepad for backup.

10.  If you only one to disable one or two plugins instead of the whole lot, here’s what you need to do:

• Delete the line/code section of the plugin that you want to disable.

• Make sure that you fix the numbering of the plugins so that they are in consecutive order. Start with the a:n (from a:4 it should now be a:3). Click “GO” to save changes.

Example, if you want to delete the second plugin, your new code should now look like this:

a:3:
 {
i:0; s:23: ”NameOfFirstPlugin/PluginOne.php”;
i:1; s:43; ”NameOfThirdPlugin/PluginThree.php”;
 i:2; s:27: ”NameOfFourthPlugin/PluginFour.php”;}

When you need to urgently deactivate a plugin and your WP Dashboard is inaccessible, you have phpMyAdmin as your alternative.

Image by FreeDigitalPhotos.net

Article By: Wasim Ismail

Wasim’s a project manager at Alrayes Web Solutions along with an online SEO consultant & blogger for business at wasimismail.com, specialising in online business.


Comments are closed.