Lost your WordPress plugins?

This blog is hosted on WordPress, using GoDaddy hosting (I know, more fool me.)

Last night, I checked the site and realised that all my plugins were giving the following error

“Plugin deactived due to an invalid header”

I refreshed the plugin page and all the plugins disappeared.

So I booted up Filezilla and checked the source files. The plugin folder was still there.

After a dance of rage around the net, I found this helpful Sourceforge article, http://stackoverflow.com/questions/19976194/all-plugins-deactivated-and-cannot-install-the-plugins-in-wordpress

I decided the last answer was most likely correct. It was. Here is how to fix the problem.

Access your self-hosted wordpress installation using FTP and copy the plugins folder to your local machine.

Now for the boring bit. You need to open every singe PHP file in the plugins folder and delete whatever malware nonsense has been added to the top of the file. As a rule of thumb, delete everything down to the <?php which starts the actual content.

Save all the files. Re-upload.

All my plugins are working again, but it was an irritating few hours. If you are unsure that you are deleting the right bits, start with one plugin – ideally one with very few PHP files – and make a copy before you edit it. Then save and upload that one plugin folder to check that you have got it right.

Hopefully this will help someone!

One thought on “Lost your WordPress plugins?

  • 21st July 2018 at 10:56 pm

    This Saved my life,, Thanks. Faced with same malware , restored all plugins by removing the junk text from plugin php files.


Leave a Reply

Your email address will not be published. Required fields are marked *

?php do_action( 'freedom_before_footer' ); ?>