Two ways to Manually Disable WordPress Plugins

disable-wordpress-plugin

One of the qualities of an effective WordPress administrator is knowing how to quickly recover from a major disaster. Of course you should test all of your changes on a dummy site first but sometimes it’s just so much easier to make a quick change on a live site. Unfortunately as we all know this can prove disastrous. In this article, I’m going to show you two ways to manually disable WordPress plugins without having to go through the WordPress administration dashboard. So in case you just installed a new add-on, updated it, or modified it in any way that renders your site inaccessible, you can quickly revert the changes before your heart slows down! There are two ways to go about this:

  • Disable via FTP
  • Disable through phpMyAdmin

DISABLING VIA FTP

Of course you need to have a good FTP client for this. Log in, navigate to the directory in which your blog is located and go to the following location:

wp-content/plugins

Here you’ll be presented with a list of plug-ins each of which has its own folder as shown in the screenshot below.

disable-wordpress-plugins-1

 

n order to disable one of them, I simply rename the folder to something else. For example, in the picture above if I’m trying to disable the “Tiny MCE Advanced” plug-in, I rename the “tinymce-advanced-backup” folder to something like “tinymce-advanced-backup”. And that’s it! Plug-in magically deactivated. If you want to remove it entirely, simply delete the folder and you’re done.

The next time you log into the WordPress plug-ins area, you will receive a red notification warning at the top informing you that the appropriate plug-in has been disabled because the file wasn’t found like this:

disable-wordpress-plugins-2

Keep in mind though that changing the folder name back to its original will not automatically reactivate it either.

The FTP method is a great way to quickly take out specific plug-ins that you know are the cause of the malfunction on your blog – probably because it stopped working immediately after you made a change. But what if you’re not sure of the problem, or someone else messed something up? How do you quickly disable (not delete) all of the plug-ins at once so that you can reactivate them one by one to find the source of the error?

DISABLING PLUGINS VIA PHPMYADMIN

As with all operations involving databases, you have to be very careful here lest something go wrong. It is always prudent to take a quick backup before making any changes. With that said, the database is often the quickest way to resolve many intractable problems. I had previously written about how to change the username and password of a WordPress user including the admin itself using phpMyAdmin – the open source web-based database administration program that is so incredibly useful. You can refer back to that article if you don’t know how to access the phpMyAdmin console or what the icon looks like.

In that article, we opened the “wp_users” table. In order to disable plug-ins, navigate to the “wp_options” table instead.

disable-wordpress-plugins-3

 

This will show you all the rows in the table, but there can be thousands of them. We want the row where the “option_name” column has a specific value. To do this, we’re going to craft our very own SQL query. There will be a series of tabs at the top of the screen labeled “Browse”, “Structure” etc. Click the one called “SQL”:

disable-wordpress-plugins-4

You will now be presented with a text box with a query already inside it. Delete it, and paste this one instead:

Click the “Go” button at the bottom right. The results will consist of exactly one row where “option_name” has the specified value of ‘active_plugins’. Click the “Edit” button at the left end of the row to bring up the edit screen:

disable-wordpress-plugins-5

As you can see, the “option_value” field is the one of interest to us. The text within it specifies both the number of active plug-ins as well as their names. The very first value in the example above tells me that I have 14 plug-ins installed. If you peruse the text within the curly brackets carefully, you will see that it starts off with i:0, then the next is i:2, and so on up to i:13. It also gives us the location of the main plug-in file.

But all of this is only for interest. If you want to deactivate all the WordPress plug-ins in one go, just delete the entire entry after taking a backup of its contents by pasting it in notepad or something in case you want to revert to the earlier situation. Then paste this into the text box:

Also note that you can individually deactivate a plug-in by modifying the text. Say for example you feel that the Jetpack plug-in is causing your problems. In the example above, remove the line:

Now you need to change each individual “i” after that to ensure that the numbering is consecutive. In other words, “i:7” will become “i:6”, “i:8” will become “i:7” and so forth. You’ll also have to change the very first “a” value. In my case, “a:14” will become “a:13” since I will only have 13 plug-ins activated instead of 14.

Once again, don’t forget to take a backup of the original text in case you have to start over! After you’ve made your changes, hit “Go” to apply them. And magically, all of your plug-ins have been deactivated if you chose to replace the text with a:0:{} . From here, you can go to the WordPress plug-ins screen from the dashboard and enable them manually one by one until you find the one that’s causing the error. After that, it’s a simple matter of disabling it either via FTP or using phpMyAdmin once again as just described.

Ashwani Bhatia

Ashwani Bhatia

Highly creative, innovative and multitalented web designer and developer with 9+ years experience in front end development technologies including advanced PHP,HTML5,CSS3, JavaScript, AJAX and Internet Marketing.

You may also like...

Leave a Reply

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


+ three = 7

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">