Disable one WordPress plugin from the database
When troubleshooting an error on your WordPress site, it may be necessary to disable one or more plugins. If you can't access your WordPress dashboard, you can disable a plugin from the site's database. If you're not sure which plugin is causing the issue, enable WordPress debug to find out.
Warning: You should always make a backup of your site before making changes in the database. Also, disabling one or more plugins may affect the way your site looks and functions.
- Sign in to phpMyAdmin.
- In phpMyAdmin, on the left menu, select the name of the database your site uses.
Note: If you have more than one database in your hosting account, you can check your wp-config.php file to find out which database your site uses.
- Select the wp_options table (select the text, not the checkbox).
Note: Some databases have prefixes different than wp_, so focus on finding and selecting the table with _options in the name.
- On the right side, in the list of entries, find active_plugins. It’s usually on the second page of entries.
- Next to the active_plugins entry, select Edit.
- In the option_value row, select all the text in the field and copy it to a text editor of your choice. Once the text is copied to a safe place, you can edit it in phpMyAdmin.
- In phpMyAdmin, find the plugin you want to disable and delete its reference. You should delete everything from i: to ”; for that plugin.
- Update a:X, where X matches the number of active plugins on your site. For example, if you previously had four active plugins, a:4 should be changed to a:3 when you deactivate one plugin.
- Select Go to apply the change and deactivate the plugin.
Related steps
- To enable the deactivated plugin in the database, follow steps 1-5, replace the text in phpMyAdmin with the text copied in step 6 and then select Go.
- If you have access, you can also enable the plugin from your WordPress dashboard.
More info
- If you're not familiar with phpMyAdmin and you have access to your WordPress dashboard, you can also deactivate your plugins from there.
- Disable a WordPress plugin with FTP
- Troubleshooting WordPress
- Change my WordPress theme in the database