When troubleshooting a WordPress problem or error, it is often recommended to disable all plugins and then reactivate them one by one.
This is a way to find the cause of an error caused by a WordPress plugin or theme. So if it is not possible to use our WordPress administration panel, how to disable the plugins?
In this article, we will show you how to easily disable one or all plugins when it is not possible to access WordPress wp-admin.
First method: Disable plugins using FTP by renaming the folder
In this method, we will use an FTP client or the file manager option in our WordPress hosting control panel.
For those who have not used FTP before, you can check our tutorial on how to establish an FTP connection with your hosting account.
The first thing we will do is connect to our website using the FTP client we are using or with the File Manager in cPanel. Once connected, we must navigate to the wp-content folder.
Inside wp-content, we will see a folder called plugins. This is where WordPress stores all the plugins installed on our website.
Next, we right-click on the plugins folder and select Rename. Afterwards, we change the name of the plugins folder by giving it any name we want. In our example, we will call it plugins.deactivate.
Once we have completed the previous step, all our plugins will be deactivated.
Basically, WordPress will look for a folder called plugins to load the plugin files installed on our WordPress site. However, since it does not find the folder, it automatically disables the active plugins in the database.
This method is usually used when access to our admin area is blocked. If the cause of the problem was one of our plugins, then we should now be able to log into our WordPress admin area.
Thanks to this method, login access to our WordPress admin area will be restored.
If we visit the Plugins page inside the WordPress admin area, we will now see notifications for all deactivated plugins.
We will also notice that all our plugins have disappeared. This should not worry us, they are all safe and we can restore them easily.
To restore them, we go back to our FTP client and enter the wp-content folder. From here, we must rename the folder plugins.deactivate back to plugins.
Now we can go back to the Plugins page inside the WordPress admin area and activate one plugin at a time until our site breaks again.
At that point, we will know exactly which plugin caused the problem. We can then delete that plugin from our site via FTP or request assistance from the plugin’s author.
Second method: Disable plugins using phpMyAdmin
The general opinion is that the FTP method is definitely easier. However, we can also disable all WordPress plugins using phpMyAdmin.
Note: Beforehand, we must make sure to perform a full backup of our site’s database. This will be useful in case something goes wrong.
Next, we log in to our web hosting control panel. In this example, we show the cPanel dashboard which may look different from any other hosting account.
Then, we click on the phpMyAdmin icon in the Databases section.
This action will launch phpMyAdmin in a new browser window. We select our WordPress database, if we have not already selected it. After that, we will be able to see the WordPress database tables.
As we can see, all the database tables have the prefix wp_ before the table name. Our tables may have a different database prefix.
To continue, we click on the wp_options table. Inside the wp_options table, we will see rows of different options. We will need to find the option active_plugins and then click the Edit link next to it.
On the next screen, we must change the option_value field to:
a:0:{}and then click the Go button to save the changes.
And with this, we have successfully deactivated all WordPress plugins using phpMyAdmin.
If it was a plugin that was preventing us from accessing the WordPress admin area, then we should be able to log in now.
Third method: Disable plugins using the WP-CLI command line interface
Finally, the third method of disabling WordPress plugins is using the WP-CLI command line interface.
This is a command-line tool used to manage WordPress.
To get started, we launch WP-CLI and run the commands that will disable one or more plugins in our WordPress.
Before starting, we must know the name of the plugin we want to disable.
The name of the plugin that we want to disable and that we will use in WP-CLI is taken from the name of the folder that contains it. We will use wordpress-seo as an example.
Another way to do it is by running the following command which will show us a list of the plugins we have installed on our WordPress site:
wp plugin list
Applying the previous command we will obtain the following:
If we want to deactivate a single plugin (wordpress-seo), we write the following command:
wp plugin deactivate wordpress-seo
And we will obtain the following:
This means that WP-CLI has deactivated the wordpress-seo plugin.
However, if we want to deactivate all the plugins, we write the following command:
wp plugin deactivate --all
Then, the following will appear:
And with this, we have deactivated all the plugins on our WordPress site. In this case two plugins: schema and wordpress-seo.
In this method, just like in the previous one, if it was a plugin that was preventing us from accessing the WordPress admin area, then we should be able to log in now.
As we have seen, if we use WP-CLI it is much faster and more direct to disable the plugins on our WordPress site.
In addition, if we get used to using the command line interface, we will be able to manage our installations and deactivations quickly and easily. You only need to know the different WP-CLI commands by visiting the official site at WP-CLI Commands.
We hope this article about how to disable all plugins when it is not possible to access wp-admin has been useful. More information about this and other topics at https://guias.sered.net/










