Disable a WordPress Plugin Without Access to Your Admin Area

Everyone knows how to disable plugins in the Admin section. It is simple and straightforward. When a plugin has an error, it makes your site broken and blocks access to the whole site, including the Admin area. In this situation, we need a way to disable that broken plugin to make the site work again and proceed with fixing it later.

Method #1: Rename the plugin folder

This approach requires your access to FTP or the server’s File Manager.

Browse to the broken plugin’s folder! It is under /wp-content/plugins.

Rename the folder to any name which should be different from the original one. In this example, I renamed “askimet” to “askimet-2”

After this, the site will be working again and you can access the Admin section to delete the plugin or fix it.

Method #2: Disable via the database

This method is more complicated and requires you to have knowledge of the MySQL database. You should back up the database before doing anything on it.

Open wp_options the table in the database via phpMyAdmin or adminer. This table’s name might be different depending on how you choose the table prefix when installing WordPress. In general, the name should be PREFIX_options.

Search for the row in which option_name is “active_plugins” and then Edit that row.

You will see something like this

a:5:{i:0;s:30:"advanced-custom-fields/acf.php";i:1;s:43:"all-in-one-seo-pack/all_in_one_seo_pack.php";i:3;s:43:"custom-post-type-ui/custom-post-type-ui.php";i:4;s:37:"download-manager/download-manager.php";i:5;s:51:"mailchimp-for-woocommerce/mailchimp-woocommerce.php";}

It contains definitions for all active plugins. What we need to do is to remove a part of the string that defines the broken plugin.

Let’s deactivate mailchimp-for-woocommerce.

Remove this text i:5;s:51:"mailchimp-for-woocommerce/mailchimp-woocommerce.php";.

And decrease the total active plugins to 4 with a:4.

The final should be like this:

a:4:{i:0;s:30:"advanced-custom-fields/acf.php";i:1;s:43:"all-in-one-seo-pack/all_in_one_seo_pack.php";i:3;s:43:"custom-post-type-ui/custom-post-type-ui.php";i:4;s:37:"download-manager/download-manager.php"}

Leave a Comment

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


Scroll to Top

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close