I am having an issue upgrading one particular plugin on a site of mine. All other plugins on this site upgrade without an issue. It is not a permissions issue as this has been checked multiple times and like I say all other plugins update perfectly.

The error occurs during the unzipping of the upgrade package. Specifically it occurs in the _unzip_file_ziparchive function.

The error is sometimes mkdir_failed_ziparchive (Could not create directory) and other times it is copy_failed_ziparchive (Could not copy file). The directory or file on which it fails varies.

It is not the first directory it tries to create or the first file it tries to copy. I have run the process with some logging code added and can see that it is able to create many directories/copy many files to the location in the wp-content/upgrade folder before throwing the error.

I am stumped as to what the cause could be and would appreciate any insights.

  • Flagging this as Duplicate: delete this or the other question!
    – Charles
    Mar 4, 2016 at 16:14
  • Other one deleted
    – Michael
    Mar 4, 2016 at 16:18

1 Answer 1


The name of the temporary file created by the download_url function is 118 characters long.

The length of this is causing the full path name of some files or directories created during the unzip process to be longer than the allowable length on Windows. Therefore an error is thrown and the plugin upgrade fails.

I have added details to the thread at https://core.trac.wordpress.org/ticket/33053.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.