In order to view active plugins run:
mysql
use database;
SELECT * FROM wp_options WHERE option_name = "active_plugins";
From shell command line
mysql --host=localhost --user=database_user --password=dbpassword database -e 'SELECT * FROM wp_options WHERE option_name = "active_plugins";'
Save active plugins to file
mysql --host=localhost --user=database_user --password=dbpassword database -e 'SELECT * FROM wp_options WHERE option_name = "active_plugins";' |grep active_plugins |awk '{print $3}' > active_plugins.txt
To disable all plugins run:
mysql use database; UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins'; [mysql --host=localhost --user=database_user --password=dbpassword database -e 'UPDATE wp_options SET option_value = "" WHERE option_name = "active_plugins";'
Recover all change back:
mysql --host=localhost --user=database_user --password=dbpassword database -e "UPDATE wp_options SET option_value = '`cat active_plugins.txt`' WHERE option_name = 'active_plugins';"
Similar Posts:
- ClientExec how to reset password via mysql command line
- How to create a MySQL database, username, password and privileges from the mysql command line
- How to connect at MySQL database
- How to reset WordPress password through MySQL command line
- How to create database, database username and grant all rights on cPanel server via command line using UAPI