Fix WordPress Missing Archive File or Download Failed

If you’re trying to install or update a plugin or theme or even updating WordPress core or when wordpress try to downloads a plugin ZIP file, then it has to be able to write that file somewhere. To do this, it uses xxx\TEMP directory.

If WP detects that it cannot write files to this temp directory, then you get the error message like “The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘\TEMP/xxx.tmp ” .

Most of time this error occur while updating your plugin name or download failed or destination directory for file streaming does not exist or is not writable.

So here we discuss how to fix WordPress missing Archive file or download failed.

1. Go to Your wp-content folder via log in to your C panel or by FTP access. Path is: Your Domain/wp-content

2. Once you open the wp-content folder. create new folder under wp-content. it’s called temp.

3. Download your wp-config.file from your server in your computer. Edit this file and find the below line of code.

if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

4. Add following line of code after that.

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

5. Save this wp-config.php file and upload/replace this file to your server.

This code is fix your issue.

Scroll to top