I have a wordpress script, wp-supercache, that I need to disable (as its cached on a nasty error), however, the error is causing the wp-admin redirect to fail, which means I can't get into the site to disable the plugin.
Any advice? I can access the database via cpanel.
Normally, disabling a WordPress plugin is very simple and straightforward. How easy? You can login to your admin area, click the “Plugins” tab and click “Deactivate” next to the plugin.
Once you've accessed the root folder of WordPress, find and access the directory labeled, “wp-content.” Find the directory labeled, “plugins.” Right-click this folder and then click the “Rename” option near the bottom of the list. Rename the folder, “plugins. deactivate.”
Try re-naming the folder of the plugin and then see if error is gone (make backup first of course.). If that does not help, here is the solution then.
To disable a specific plugin, you have to remove it from the serialized string that stores the list of all plugins - that's set in the option_value
column of the wp_options
table as discussed by @TimDurden. The specific format change you have to make is, taken shamelessly from teh Internet:
a:4:{
i:0;s:19:"akismet/akismet.php";
i:1;s:36:"google-sitemap-generator/sitemap.php";
i:2;s:55:"google-syntax-highlighter/google_syntax_highlighter.php";
i:3;s:29:"wp-swfobject/wp-swfobject.php";
}
That first set of characters - a:4
- designates an array and its length. Note also that each line in the list of plugins has an index. So:
i:
Update the value in the db using the new string you constructed from these steps:
update wp_options set option_value=<new value> where option_id=<id of this option>
Note that your table name might not be wp_options - you might have a prefix to add.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With