Disable a WordPress Plugin Without Access to Your Admin Area

| WordPress
Disable a WordPress Plugin Without Access to Your Admin Area

Normally, disabling a WordPress plugin is very simple and straightforward.

How easy? You can login to your admin area, click the "Plugins" tab and click "Deactivate" next to the plugin.

You can see an example below with Google Analytics.

Disable a WordPress plugin

However, sometimes a plugin can make things more complicated and cannot be easily disabled.

Some plugins can cause problems with logging into your admin area. That's exactly what happened to one of our members. They changed a setting inside a plugin and suddenly started getting these errors when trying to login.

So, what do you do if you can't login to your WordPress admin and disable a plugin? You have two choices:

Option #1: Disable the Plugin Files

The easier of the two options is to disable the plugin's files.

  • Login to your site's files using the file manager provided by your webhosting company or using an FTP program such as Filezilla.
  • Browse to the /wp-content/plugins/ folder.

The akismet plugin folder in /wp-content/

  • Find the folder of the plugin you wish to disable.
  • Rename that folder as in the image below:
A renamed version of the akismet plugin folder

Try to login to your WordPress site. You should get a message telling you that the plugin has been disabled.

Now you can set up about solving the initial problem with the plugin, either by deleting the plugin entirely or by researching and fixing the initial error.

Option #2.: Disable via the Database

The second option is more complicated and that is to disable the plugin via the database. First, you'll need to access the database for your WordPress site. phpMyAdmin is a popular tool for this that's provided by many hosts and it's the one we'll use in this tutorial.

Once you've logged into the database, look for the wp_options table:

The wp_options table in the WordPress database

You're looking for a row with the option called active_plugins as below:

The active_plugins table in the WordPress database

If you want to turn off all the plugins on your site, you can simply delete this entire row by clicking on the red X button beside it. This sounds like a drastic action, but isn't really so bad and won't cause any lasting harm. Yes, all your plugins will be disabled, you can quickly login to WordPress and re-enable them.

Disabling all your WordPress plugins via the database

If you want to disable just one plugin, click on the pencil icon instead:

Disabling one WordPress plugin via the database

You'll now see a screen like the one below:

the active_plugins data in the WordPress database

All you need to do here is change one thing. Change the a:1 before your plugin name to a:0.

So in this example, the original line is:

disabling a WordPress plugin

You will change that to line to this one:

changing your WordPress database to disable a plugin

To save your changes and finish disabling the plugin, click Go in the bottom-right corner.

Save your WordPress database changes

Now you can set up about solving the initial problem with the plugin, either by deleting the plugin entirely or by researching and fixing the initial error.