The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10)

The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) This tutorial explain and solves the issue of having error “The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : UNABLE TO FIND END OF CENTRAL DIR RECORD SIGNATURE” while uploading the WordPress plugin file in wp-admin.

While trying to install a plugin by uploading it on my WordPress site I received this error:

Installing Plugin from uploaded file: filename.php
Unpacking the package...
The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : UNABLE TO FIND END OF CENTRAL DIR RECORD SIGNATURE
Return to Plugins page

The plugin was fine (code by me, myself) and the WordPress site was fine too and uploaded other plugins normally too! So what was the issue?

Solution to PCLZIP_ERR_BAD_FORMAT (-10) error:

The issue causing this error is that the plugin file has to be zipped file, not a php file directly.

So the solution to this error is to simply zip the file and then upload!

Zip the plugin.php file which you want to upload and it should upload normally!

Hopefully this solves your issue of having error while uploading the plugin.php file to your WordPress site. If you have any queries or error still persists please comment below with details of the error so that I can try to help you fix it!

Leave a Reply

Your email address will not be published.