PCLZIP_ERR_MISSING_FILE(-4): Missing Archive

When updating my web site I received a 400 error and I could not save my changes. Shocking when you update the plugins in your WordPress site and shows error like “PCLZIP_ERR_MISSING_FILE(-4): Missing Archive File ‘/tmp/[some file].tmp’” if this is a question mark to you, this is an old thread but other may face this in WordPress 5.2.4 as others experienced.

Issues Causes

When you try to update WordPress or install plugins, the downloader or installer page pops up, the compressed file is downloaded to your server, but installation fails because of this error:

PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘C:\Windows\TEMP/{whatever you were installing}.tmp’

First Solution

Your php value “open_basedir” are set to “none”. You will need to change the php value to a directory for example “C:\Windows\tmp”.

Then try updating WordPress or installing a plugin. It should work now.

Second Solution

To fix the error, try creating a “tmp” folder like “wp-content/tmp/”. However, location must be determined from which directory should store “tmp” files through editing “wp-config.php”. You need to access the files on your server via FTP. On your server, navigate to the /wp-content folder. Create a new folder inside it called “tmp”.

1. Open wp-config.php
2. Scroll down to the line “if ( !defined(‘ABSPATH’) ) define(‘ABSPATH’, dirname(__FILE__) . ‘/’);”
3. Below it, write code “define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/tmp’);” then Save the file.
4. Create folder named “tmp” at “wp-content”. e.g. “wp-content/tmp”
5. Click “tmp” folder and click manage permission.
6. Check all the boxes (The folder should be writable chmod 777)

Try updating WordPress or installing a plugin. It should work now.

Third solution

This solution is not to use Windows hosting server. Choose a Linux hosting server.

You may also like...