You might encounter the PCLZIP_ERR_BAD_FORMAT (-10) while updating the plugin/theme on your WordPress site.
Two reasons cause the PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record error:
Most of the themes and plugins have a solution to this problem, as it is one of the most occurring errors. It is not a critical error; however, if not fixed, you may not be able to update the plugins and themes. And having outdated themes and plugin makes the site vulnerable to hacking.
Let’s see how to fix PCLZIP_ERR_BAD_FORMAT (-10) error on WordPress site.
Issue with Zip File
You can only install the Zip files on WordPress. Sometimes the compressed zip files are corrupted, or their format is broken.
They are zip files, but with misconfigured structure. That could happen for various reasons, such as failed internet connection during the downloading of the file. Or it could have occurred at the web server itself.
Whatever the reason, you only have to download the file again, and the issue will be solved.
- Download the file again
- Download the file from the trusted source
- Refresh the page before uploading
- Purge the URL cache
Hopefully, you will be able to install the theme or the plugin without getting the error. If this does not work, it means the problem is not with the file but with the space limitation.
Memory Shortage on the Web Server
WordPress has to unzip the file and upload the content of the file to the root directory while installing the package.
PCLZIP_ERR_BAD_FORMAT (-10) means WordPress is not able to do that.
This means WP is unable to unzip the file and upload the content, and the reason could be a lack of space.
You can confirm this by uploading the other asset (such as images, etc.) to WordPress. If there is no space left, then it will not be possible to upload the files.
You have to contact your hosting provider to increase your space. If you are on Cloud storage, then it will be quick.
With ServerGuy, you get scalable WordPress hosting, which means you can easily and quickly scale up the site’s resources.
More Specific Solution
If the problem persists, you can get a more specific solution by contacting the developer of the theme/plugin.
Most of them have a knowledge base and forums where they solve such issues.
I hope this post helps you to solve the PCLZIP_ERR_BAD_FORMAT (-10) issue on WordPress site.
If there is any other issue, leave that in the comment box.