How to easily disable a wordpress plugin
Todays post will show you how to disable a wordpress plugin easily. This is particularly useful if a plugin update does not work or causes issues.
I was a bit stuck to decide what to write about, until I logged in my WordPress Admin panel and saw that Flowplayer5 plugin needed an update. As usual I went to plugins and selected to update it which all worked fine until I then tried to create my new post. I got the 500 apache server error page.
So time to look through the apache logs to see why. I came across this error –
PHP Parse error: syntax error, unexpected '[', expecting ')' in ............./wp-content/plugins/flowplayer5/admin/settings/class-register-settings.php on line 52
Checking the code there looked nothing immediately obvious wrong with the code, but my website was down, so my main task was to get it running again!
The easiest thing to do is simply disable the wordpress plugin. But how you ask, when you cant get to the wordpress admin page???
Fortunately I have ssh access to my server, but it is still possible to do this if you have some control panel like cpanel etc.
Use your file manager. All thats needed is to rename the specific plugin folder from within wp-content/plugins directory. In my case today I simply did this –
[root@vs3 plugins]# mv flowplayer5 flowplayer5.tmp
WordPress then cannot see the plugin and doesnt load it. Then you can speak to the developer of the plugin to fix the issue (in the above instance with flowplayer there was a coding issue on my version of PHP).
Once you have a fixed version, you can extract it and move it to the plugins directory and if everything goes well it will work again.
What I have also noticed is when you rename the plugin to .tmp then it also marks the database that the plugin is inactive. When you copy in the new one you will then have to activate it in wordpress admin again.
You should now have WordPress working again.
Check out my other WordPress hints and tips HERE or subscribe to my blog for email updates and new tutorials, using the form on the right side at the top.