I have wordpress version 3.4.2
Whenever I try to activate a plugin after installing it I get
The plugin does not have a valid header.
I tried removing the blank spaces between
<?php
/* plugin info
inside the plugin_name.php file. However, it does not resolve the issue.
Any workaround?
One of your plugins is bad. I’m guessing you know which one is likely to be the culprit.
Delete its wp-content/plugins/myplugin directory from your server entirely. Then, when you display your Plugins page you should get a notice announcing that the plugin you just deleted has been disabled. The other stuff should work.
Fix your plugin code. Make sure you know precisely what’s in the zip file or directory hierarchy you upload. Get rid of extra stuff like nested zip files or .svn directories.
Upload it and try to activate it again.
Maybe in your header, there are such characters
$ : % / &
(or etc), like:Try to remove that, and then activate again.
Back up your WP site and update your WordPress version and the relevant plug-in.
I faced the same issue with a plug-in I’ve used for over 2 years – Page Builder by SiteOrigin. It wasn’t compatible with WordPress 4.9.9 as well as before and the developers had not informed us about the updates to the plug-in.