More fixes

WordPress: "Incompatible Archive" / PCLZIP_ERR_BAD_FORMAT

You upload a plugin or theme zip under Add New, click Install Now, and WordPress answers "Unpacking the package... The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature", or just "Incompatible Archive". WordPress could not open the zip. In almost every case the file is damaged, cut short, or not the zip WordPress expects; now and then the server is missing its zip tool. Here is how to tell which in a few minutes.

What the owner sees

harborbakery.example/wp-admin/update.php?action=upload-plugin

What the checks found


  

Which problem is it? (five minutes)

  1. Open the zip on your own computer. Double-click it. If your computer also says it is damaged or empty, the download broke. If it opens, look inside: one folder with the plugin's name, with the plugin files in it, is what WordPress wants.
  2. Check the size. A 0 KB file, or one far smaller than the seller's page says, was cut off mid-download. Download it again, ideally in a different browser.
  3. Look for a zip inside the zip. Marketplaces such as ThemeForest and CodeCanyon hand you a "package" zip holding documentation, licences and the real installable zip. Uploading the outer one gives exactly this error. Unzip it and upload the inner theme-name.zip or plugin-name.zip.
  4. Mac users: was the file unzipped for you? Safari opens zips automatically and leaves a folder. Zipping that folder again with Compress usually works, but the safest route is to turn off "Open safe files after downloading" and download again.
  5. Is it a theme in the plugin screen, or the reverse? A theme zip uploaded under Plugins (or a plugin under Themes) fails with "No valid plugins were found" or a missing style.css message, not PCLZIP, but it is worth ruling out.

Fix it, safest first

  1. Download a fresh copy from wordpress.org or the seller's account page, and upload that file without opening it first.
  2. Upload the inner zip if the download was a marketplace package (step 3 above).
  3. If the file is fine and still fails, it is the server. WordPress uses PHP's ZipArchive and falls back to its own PclZip; a host with the zip PHP extension switched off, or an exhausted temporary folder, can break both. In cPanel, Select PHP Version, Extensions, tick zip, or ask the host to enable it.
  4. Large zips on a small plan. If big themes fail but small plugins install, the upload limit is cutting the file off. The upload screen shows "Maximum upload file size". Ask the host to raise upload_max_filesize and post_max_size above the zip's size.
  5. No time to wait for the host? Unzip it on your computer and upload the folder to wp-content/plugins/ (or themes/) with File Manager or SFTP, then activate it in the dashboard. Take a backup first.

What you see, what it means, what it needs

What you seeWhat it meansUsual fix
PCLZIP_ERR_BAD_FORMAT (-10), End of Central DirThe zip is cut short or damagedFresh download, uploaded unopened
Incompatible ArchiveNot a zip WordPress can read, often a package zipUpload the inner installable zip
Only big zips failUpload limit truncates the fileHost raises upload_max_filesize and post_max_size
Every zip fails, even fresh ones from wordpress.orgServer zip tool or temp folder missingEnable PHP zip extension; host checks the temp folder
"No valid plugins were found"Theme zip in the plugin screen, or extra folder levelRight screen, or rezip one folder deep

What not to do

Most cases are a fresh download or the inner zip. If every zip fails and the host is not helping, that is what the box below is for. Related: "Installation failed", upload errors, "Destination folder already exists", "The plugin does not have a valid header".