You download a plugin, upload it through your dashboard, and WordPress immediately throws the dreaded "The package could not be installed. No valid plugins were found." error. Sound familiar?
In almost every case, the problem isn't your WordPress site—it's the structure of the WordPress plugin ZIP you just uploaded. Marketplace bundles, GitHub source archives, and re-compressed macOS folders all look like valid archives from the outside, yet WordPress rejects them on sight.
In this guide, you'll learn how to inspect a WordPress plugin ZIP before uploading, recognize the exact folder hierarchy WordPress expects, and fix the most common upload failures in minutes.
What a Valid WordPress Plugin ZIP Actually Looks Like
When you upload a file via Plugins → Add New Plugin → Upload Plugin, WordPress does not blindly dump files onto your server. Instead, its upgrader unpacks the archive into a temporary folder and scans only the first level of subdirectories for a valid plugin bootstrap file.
Specifically, WordPress checks the official plugin header requirements: a PHP file containing a docblock comment starting with Plugin Name: within the first 8 KB of the file.
Here is the exact directory tree WordPress expects inside a healthy WordPress plugin ZIP:
my-plugin-slug.zip
└── my-plugin-slug/
├── my-plugin-slug.php <-- Contains "Plugin Name: My Plugin"
├── readme.txt
├── uninstall.php
├── includes/
└── assets/
Notice what happens if you zip the inner files directly without a parent folder, or if you zip the parent folder twice so there are two nested folders. WordPress looks one folder deep, finds no PHP header, and aborts the installation.
4 Types of Plugin ZIP Downloads (and Which Ones Work Out of the Box)
Not every .zip file named after a plugin is an installable runtime package. Vendors, marketplaces, and open-source maintainers distribute archives in four distinct formats.
| Download Type | What's Inside the Archive | Ready to Upload? | Required Action |
|---|---|---|---|
| WordPress.org Release ZIP | Single plugin-slug/ folder with compiled assets and PHP files |
Yes | Upload directly in WP Admin |
| Marketplace "All Files" Bundle | Docs, licensing PDFs, PSDs, plus an inner plugin.zip |
No | Unzip once; upload only the inner installable ZIP |
| GitHub Source Archive | repo-main/ with composer.json, package.json, unbuilt JS/CSS |
Usually No | Download from GitHub Releases or run build steps first |
| macOS Re-compressed Folder | Plugin folder alongside hidden __MACOSX/ metadata |
Risky | Strip __MACOSX and verify root folder slug |
The takeaway? Never assume a 45 MB download from a theme or plugin marketplace goes straight into WordPress. If the filename contains words like bundle, package, or all-files, open it locally first.
How to Inspect and Install a WordPress Plugin ZIP Safely
Before you touch your live dashboard, run through a quick three-step inspection. Taking 90 seconds here prevents broken updates, duplicate plugin folders, and white screens on production sites.

- Confirm the target site and back up first: Verify you are logged into the right environment (staging vs. production) and create a fresh restore point. Our backup guide explains how to capture both files and database tables before installing custom archives.
- Inspect the archive contents locally: On Windows, macOS, or via terminal (
unzip -l plugin.zip | head -n 30), confirm there is one clean root directory matching the plugin slug. Look for a main.phpfile inside that directory and make sure there is novendor/omission or uncompiledsrc/-only tree. - Check for an existing installation: Open Plugins → Installed Plugins in WordPress. Since WordPress 5.5, uploading a ZIP for an already-installed plugin triggers a comparison screen where you can click Replace current with uploaded—provided the folder slug inside the ZIP matches the existing folder in
wp-content/plugins/. - Upload and test core functionality: Follow the standard WordPress plugin-management guide to upload, activate, and verify that the plugin actually fires. For instance, if you just installed a contact utility, submit a test entry using the checks outlined in our forms guide, or confirm rewrite rules flush cleanly if you added an SEO tool from our 301 redirect guide.
Troubleshooting Common Plugin ZIP Upload Errors
Even when the archive looks right, server configuration or macOS compression quirks can trip up the installer. Here is how to diagnose and fix the four most frequent errors.
1. "The package could not be installed. No valid plugins were found."
Why it happens: Either you uploaded a parent marketplace bundle containing documentation folders, or you downloaded a GitHub branch archive whose root folder is named plugin-name-main/ without a valid header at the expected level—or worse, you zipped the contents directly with no enclosing folder.
The fix: Unzip the file on your computer. Look inside for the actual installable ZIP (often inside an installable/ or plugin/ subfolder). If there is only a raw folder, verify the main PHP file sits directly inside one clean directory, then compress that single folder cleanly.
2. "The link you followed has expired." or HTTP 413 Request Entity Too Large
Why it happens: Your WordPress plugin ZIP is larger than PHP's upload_max_filesize, post_max_size, or Nginx's client_max_body_size. Many modern visual builders and WooCommerce extensions exceed the default 2 MB or 8 MB PHP ceiling.
The fix: Increase both upload_max_filesize and post_max_size (for example, to 64M) in your hosting panel's PHP settings or php.ini. Alternatively, upload the unzipped plugin folder directly to wp-content/plugins/ via SFTP, then activate it from the WordPress dashboard.
3. "Destination folder already exists."
Why it happens: A previous installation failed halfway, a manual SFTP upload left an orphaned folder behind, or you are installing a pro version whose slug collides with an existing folder.
The fix: If WordPress shows the Replace current with uploaded prompt, compare the version numbers and confirm replacement. If the install aborted beforehand, connect via SFTP or your host's File Manager, inspect wp-content/plugins/, and remove or rename the stale folder before retrying.
4. Re-zipping on macOS creates duplicate or broken archives
Why it happens: Using Finder's right-click Compress command embeds a hidden __MACOSX resource fork directory and .DS_Store files. Worse, some users compress the selected files inside the folder rather than the folder itself, breaking the directory structure.
The fix: Open Terminal, navigate to the parent directory of your plugin folder, and run a clean zip command that excludes system clutter:
zip -r my-plugin.zip my-plugin/ -x "*/.DS_Store" -x "__MACOSX/*"
That single command produces a portable, cross-platform archive with zero hidden metadata.
Security Checks Before Uploading Any Custom ZIP
Installing a plugin from outside the official repository carries real risk if you skip verification. Before uploading any third-party WordPress plugin ZIP, run three quick sanity checks:
- Verify the origin: Only download archives from the official developer's account, WordPress.org, or a trusted marketplace. Never install "nulled" or repackaged premium ZIPs—they routinely inject hidden admin users or backdoors into
wp-includes. - Check file timestamps and unexpected executables: Scan the unzipped folder for obfuscated code (long
base64_decodeoreval(blocks in files that shouldn't have them) and verify the version string inreadme.txtmatches the main PHP header. - Test on staging first for major updates: If you are replacing a mission-critical plugin manually via ZIP upload, verify PHP compatibility (such as PHP 8.1/8.2/8.3 notices) on a staging copy before touching production.
Frequently Asked Questions
Can I install a GitHub ZIP directly as a WordPress plugin?
Sometimes, but often no. A GitHub Code → Download ZIP archive appends -main or -master to the folder name—which can break plugin updates and slug matching—and frequently lacks compiled JavaScript or Composer vendor/ dependencies. Always check the repository's Releases tab for a pre-built ZIP first.
How do I know which PHP file inside a plugin ZIP is the main file?
Open the PHP files in the top-level plugin folder with a plain-text editor. The main bootstrap file always contains a comment block near the top starting with * Plugin Name:, along with optional metadata like Version:, Requires at least:, and Requires PHP:.
Is uploading a plugin ZIP via SFTP better than using the WordPress dashboard?
The WordPress dashboard upload is safer for most users because it checks plugin headers, verifies permissions, and handles clean replacement prompts automatically. SFTP is best reserved for oversized packages that exceed server upload limits or recovery scenarios when WP Admin is inaccessible.
