PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file
If WP detects that it cannot write files to your /tmp/…. directory, then you get the error message like “The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file”
Solution:
You can work around this by specifying a new temp directory on your server with a place that you know WordPress is allowed to write files to. You can do this by adding this line of code into the wp-config.php file.
1. Find the links blow
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
2. Add lines below
/** Specify wordpress temp dir */
define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/temp‘);
3. Open wp-content folder,
and create a new folder on your CENTOS Server named “temp“ and make sure you set the right CHOWN for your new created directory!
Try again, you will see it works like a charm.
Easy Fix here!