dxylhq
Last Updated: February 25, 2016
·
1.928K
· zachthezman
Bfb4833e40676616e28300a0b9f55d35

Fix WordPress PCLZIP_ERR_MISSING_FILE

Upgraded to WP 3.5, tried to do an automatic update of a plugin and was immediately hit with an error:

[...] PCLZIP_ERR_MISSING_FILE(-4) [...]

Added the following to my wp_config.php file:

define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));

Fixed.

Say Thanks
Respond

1 Response
Add your response

2963
573616492eef2b0d10b406268028259e

I had an issue moving a site from IIS to an apache server so I added a test if the server was IIS then define the temp directory constants

<?php if( stripos( $SERVER['SERVERSOFTWARE'] , 'IIS' ) ){ define('WPTEMPDIR', iniget('uploadtmpdir')); putenv('TMPDIR=' . iniget('uploadtmpdir')); } ?> </code>

over 1 year ago ·