Problem: WordPress issues the following error when uploading or updating a plugin or theme:
Update failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
This error message indicates that the unpacking process could not be completed.
Possible causes of errors and solutions:
- A PHP file was uploaded instead of the zip file, or the directory structure in the zip file is incorrect (for example, there is another zip file in the zip file):
Upload the correct zip file, or extract it first and upload the zip file it contains. - The zip file is corrupted:
Download and upload the zip file again. - There is not enough space (check quota) on the server to unpack the file:
Create space and upload zip file again. - An existing plugin has caused an error:
The only thing that helps here is to activate WordPress debugging and test again.
It is possible that the zip file was downloaded incorrectly and is corrupt. In this case, you should simply download it again. You can test this by simply trying to open the file locally on your PC and unzip the contents. If this fails, the file is corrupt.
If points 1-3 do not apply, you can activate debug mode to find out exactly where the error is being caused. The errors are written to the file "wp-content/debug.log". Debug mode can be activated by adding the following lines to the "wp-config" file:
define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_display', false );
Leave a Reply