You upload a plugin zip or click Activate, and WordPress stops with "The package could not be installed. No valid plugins were found." or "The plugin does not have a valid header." The plugin is usually fine. WordPress just cannot find its main file where it expects it. Here is how to tell which case you have, and the fix for each.
contact-widget/) and inside it a .php file whose top comment starts with Plugin Name:. If the zip holds another zip, or a folder inside a folder, that is the fault.style.css), a "full package" download from a marketplace (it has documentation and a licence file next to the real zip), or a source download from GitHub (named like plugin-main.zip) all fail this way.wp-content/plugins/. The plugin's folder should contain its main .php file directly, not a second folder of the same name.plugin-name-main to plugin-name, zip that folder, and upload the new zip. Better: download the release zip from the plugin's Releases page, which is packed for WordPress./* and contain Plugin Name: Something. A missing line or a file saved with a byte-order mark hides it. Re-download the plugin rather than patching it.| What you see | What it means | Usual fix |
|---|---|---|
| "No valid plugins were found" on upload | The zip has no plugin main file at the top level | Upload the inner zip, or re-zip one folder |
| "The plugin does not have a valid header" on Activate | WordPress looks for the main file in the wrong place | Fix the folder-in-folder on the server, then activate |
Zip named something-main.zip | A GitHub source download | Rename the folder, or use the release zip |
Zip contains style.css and screenshots | It is a theme | Install it under Appearance, Themes |
| "Plugin file does not exist" after an update | The plugin folder was renamed or half-replaced | Re-install the plugin; settings stay |
Plugin Name: line to some random file to make the error go away. WordPress will then load the wrong file.wp-content/plugins/.Most cases are one zip opened and one folder moved. If the plugin still will not install, that is what the box below is for. Related: plugin install or update failed, "Add New Plugin" button missing, "file type is not permitted".