There are at last two if not three ways to deactivate WordPress plugins without access to admin panel.

1. Deactivate WordPress Plugin by renaming plugin folder

Login through ftp or file manager and rename the plugin to deactivate it. This method does not allow you to turn the plugin back on once plugin folder was renamed. To activate plugin you need to access admin area or use wp-cli if available. So if you need to maintain possibility to activate crucial plugins use next approach instead.

2 Deactivate WordPress plugin through database

You can also deactivate plugin directly from database, but if that is what you after, be sure to backup entire database first. If you have access to phpMyAdmin or similar toll it will make your life a lot easier. Now after your database was saved you can go to wp_options table and search for active_plugins in option_name column then copy corresponding option_value serialized string – it will look something like this:


Thi is php serialized object saved to database. In the above example a:9 represent number of active plugins. i:0;...;i:1;...; and so on … represent index number.
s:30:"advanced-custom-fields/acf.php" where s:number represent length of string and string represent the path to a plugin file. It is possible to remove only one plugin from this setup but you need to very careful. If you break one of the above rules the data will get corrupted and wp will not be able to load plugins (this is why you make a copy first right?).

If you want to switch off all plugins you can simple replace active_plugins option_value with the value bellow (be sure to have it backuped before overriding!):


3 Use wp-cli to deactivate WordPress plugins

The last method is to use wp-cli command line tool. It allow you easily activate and deactivate plugins from your terminal. To use it you need to first install this tool on your server machine then login as ssh, navigate to site root directory and run commands like:

wp plugin activate hello
wp plugin deactivate hello

Would love your thoughts, please comment.x