It’s happened to me before more than once where I couldn’t gain access to my WordPress admin. Most of the time it was in relation to plugins. It’s usually pretty easy to tell because it’ll occur immediately after one of the following situations:

>> right after you click “activate” on a plugin, you get a white screen or PHP error
>> immediately after clicking “save” when modifying the code for a plugin
>> just after changing the settings for a plugin (usually a security plugin is the culprit here)

In the early days I would panic especially when I was driving paid traffic to the site or when I ranked really high for a high traffic keyword. I am much more cautious these days. I don’t test on an offline site or anything, but I usually make just one modification at one time.

Plus, I prepare just in case it does happen so that I am only a few clicks away at remedying the situation.

WordPress plugin dashboard

There are Two Easy Ways to Deactivate a Plugin When the WordPress Site Crashes

OK, so you broke your site and you quickly need to deactivate a plugin. Well, these are the steps that you need to remember:

>> Browse to the “/wp-content/plugins/” folder and rename or delete the folder (or in some cases the filename) for the plugin that is causing the grief.

That’s it actually, there is really only the one step. Now, there are two ways to get there, through FTP or through the File Manager of your Control Panel. Well, you can get there through a command line interface as well, but if you know how to do that you probably already know what to do. I’m just talking GUI here. phpMyAdmin is another (silly) way which I’ll discuss below.

In some cases it won’t be obvious by the name of the folder if it is the plugin that you are looking to deactivate. What you can do in that case is open the folder and look for a file with the same name as the folder and download/open it. The full name of the plugin should be listed at the top of the file.

Alternatively, Deactivate the Plugin from phpMyAdmin

In order to deactivate plugins from phpMyAdmin you will need to run an SQL command and modify a record. It’s not for the faint at heart. I would recommend the FTP (or File Manager) approach first as it is much simpler. But if you want to understand an additional process just in case, follow along with the steps below:

Note: I will demonstrate how to deactivate ALL plugins as it is easier to do.

1. Login to your web hosting Control Panel (or CPanel).

2. Go to Databases >> phpMyAdmin (login if necessary).

3. From the left, choose the database that you want to work with. Make note of the table prefix. I hope that it’s not the default “wp_” 🙂

4. Click the SQL tab from the top of the page, and execute the query below.

SELECT * FROM wp_options WHERE option_name = 'active_plugins';

Be sure of course to change the table prefix to match what you are using for this database.

5. Click the Edit text link when the result appears.

6. Remove (or modify – see below) the text within the “option_value” field.

You could just modify the value to deactivate just one (or more) plugins, and while it is relatively simple, it’s a bit difficult to demonstrate, but I will attempt to explain it.

At the very beginning of the value is a number that represents the number of active plugins. You would need to decrease that number by the number of plugins you want to deactivate. Then you need to delete the line that represents the plugin(s) you want to deactivate. All the lines are separated by semi-colons.

Then you would have to re-number them all (or some of them) to account for the ones that were removed. Then click “Go” to save the results.

Like I said, stick to the FTP route, or even the File Manager which is even easier since there is no software to install.

Video: Methods for Deactivating Plugins