Fix WordPress Missing Archive File or Download Failed

Fix WordPress Missing Archive File or Download Failed 800x249 - Fix WordPress Missing Archive File or Download Failed

If you’re trying to install or update a plugin/theme or even updating WordPress core. You might encounter error message(s) like below. These errors could be caused by the temporary directory WordPress uses for any downloads.

PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘C:\Windows\TEMP/{…}.tmp’
An error occurred while updating (your-plugin-name). Download failed. Destination directory for file streaming does not exist or is not writable.
The issue mostly occurred when your WordPress site is running on a Windows hosting and therefore PHP uses a temporary directory to which it may not write.

Solution To Resolve This is Pretty Simple

  1. Log in to your hosting control panel or access through FTP to gain access to your website files and directories
  2. Once you logged in, navigate to the /wp-content folder of your WordPress installation. Create a new directory inside it called temp.
  3. Now, download /wp-config.php file from your server to your computer and open it in a text-editor. Add the following code at the bottom

/* Set WordPress temporary directory */
 define('WP_TEMP_DIR', ABSPATH . 'wp-content/temp/') ;

Finally, Save the wp-config.php file. Upload/replace this file to your server.

This should fix the issue. Try updating WordPress or installing a plugin, if for some reason it is still failing, be sure to check file permissions on your wp-content folder, and make sure it is set to 755 so that the server can write to it. I hope you find this useful!

About This Author

My name is Parameshwar Roy (P. Roy), and I am a web developer. This is my personal blog to record my own thoughts. Though I am not a natural writer, I love to share my experiences. Hope my experiences will be useful to you…read more about me

2 Comments

You can post comments in this post.

Leave A Reply