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:
a:9:{i:0;s:30:"advanced-custom-fields/acf.php";i:1;s:51:"all-in-one-wp-migration/all-in-one-wp-migration.php";i:2;s:41:"better-wp-security/better-wp-security.php";i:3;s:33:"duplicate-post/duplicate-post.php";i:4;s:45:"enable-media-replace/enable-media-replace.php";i:5;s:25:"gtranslate/gtranslate.php";i:8;s:27:"woocommerce/woocommerce.php";i:9;s:24:"wordpress-seo/wp-seo.php";i:12;s:35:"wp-fastest-cache/wpFastestCache.php";}
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!):
a:0:{}
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
https://www.veerotech.net/kb/how-to-deactivate-plugins-from-the-wordpress-database/