Docs    Facebook    Troubleshooting

Uploading the plugin: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

PCLZIP_ERR_BAD_FORMAT (-10): Unable to find End of Central Dir Record signature has three common causes. Here is how to fix each one.

Would you like to fix the PCLZIP_ERR_BAD_FORMAT (-10) error that shows when you upload Facebook Feed Pro to your WordPress site?

In this guide, we’ll explain why WordPress shows PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature. We’ll also cover how to fix each of its three common causes. WordPress shows this error, not the plugin. You can see it when you install the plugin or when you upload a newer version over the old one.

For the last fix, you’ll also need to edit your site’s wp-config.php file.

Here is what we will cover.

Why Does This Error Show?

When you upload a plugin, WordPress unpacks its zip file with built-in tools. It tries PHP’s ZipArchive class first. If that class isn’t available, or it can’t open the file, WordPress switches to PclZip, a zip library that comes with WordPress. PclZip shows this error when it can’t find the closing record that marks the end of a zip file. That means the file WordPress received isn’t a complete, working zip.

Three things usually cause this.

  • The zip file is incomplete or damaged.
  • Your server is out of storage space.
  • An error from a plugin or script on your site is getting into the file.

To find the cause, start with the first fix below and work your way down.

The Zip File Is Incomplete or Damaged

The plugin’s zip file may have been damaged when you first downloaded it. A damaged file doesn’t have the closing record PclZip looks for. WordPress can’t read it. Downloading a fresh copy is the quickest check.

  1. Download the plugin again from your Purchase Confirmation screen or your confirmation email. You can also download it from your Account.
  2. Next, upload the new zip file to your site. For the steps, see our guide on installing the plugin, or on manually updating the plugin if you already have it installed.

If you see the same error with the new file, the next thing to check is your server’s storage space.

Your Server Is Out of Storage Space

If your web server is nearly full, WordPress may not be able to handle the whole file. To check, try uploading another file to your site, such as an image to your Media Library. If that upload fails too, storage space is the likely cause.

To free up space, remove files you no longer need from your web server, such as old database backups or themes you don’t use. You can also ask your hosting company to increase your storage.

If your server has plenty of space, the next thing to check is whether an error on your site is getting into the file.

Error Messages Are Breaking the File

A plugin or script on your site can throw an error while WordPress handles the zip file. When WordPress shows that error on screen, the message can end up inside the file and break its structure. This usually happens when WP_DEBUG is turned on in your wp-config.php file. WP_DEBUG is useful for finding errors. WordPress recommends against using it on live sites, so it’s best to turn it off there.

  1. Open your site’s wp-config.php file with your host’s file manager or over FTP.
  2. Next, find the line that sets WP_DEBUG.
  3. Then, change its value to false, as in the example below. Don’t put quotes around false. A quoted 'false' counts as true.
  4. Finally, save the file. Then, upload the plugin again.

This line turns debugging off.

define( 'WP_DEBUG', false );

If you want to keep debugging on, you can send the errors to a log file instead of showing them on screen. In wp-config.php, add the two lines below. Then, place them above the line that says “That’s all, stop editing!”. WP_DEBUG must be set to true for these two lines to work. WordPress saves the errors to the wp-content/debug.log file.

define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

The name WP_DEBUG_DISPLAY must be typed in capital letters, exactly as shown. WordPress reads the name as written. A lowercase version won’t hide the errors.

For more on these settings, see the WordPress guide to debugging in WordPress. You can also see How to Set Up WordPress Error Logs in WP-Config for a step-by-step guide.

That’s it! You now know how to fix the PCLZIP_ERR_BAD_FORMAT (-10) error when you upload Facebook Feed Pro. If you still see it after trying all three fixes, please contact Support. To keep going with your update, see our guide on manually updating the plugin. If the update doesn’t show on your Plugins page at all, see our guide on fixing an update that doesn’t show.

Frequently Asked Questions

Below, we’ve answered some of the most common questions about this upload error.

What does PCLZIP_ERR_BAD_FORMAT (-10) mean?

It’s an error from PclZip, the zip library that comes with WordPress. PclZip shows it when it can’t find the closing record that marks the end of a zip file. This means the file it received isn’t a complete zip. To fix it, see Why Does This Error Show? above.

Is Facebook Feed Pro causing this error?

The error comes from WordPress, not from a Facebook Feed Pro feature. WordPress shows it when it can’t read the plugin’s zip file. That’s usually because of the file itself, your server or an error from a plugin or script on your site.

Should I leave WP_DEBUG turned on for my live site?

No. WordPress recommends against using WP_DEBUG on live sites. It’s meant for local testing and staging sites. For the steps to turn it off, see Error Messages Are Breaking the File above.

support

Couldn’t find your answer in the docs?

Contact Support