Wordpress PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘/{plugin..}.tmp’ : error

How to fix PCLZIP_ERR_MISSING_FILE (-4) Missing file '/{somefile.tmp}' error when updating plugin in Wordpress 

This solution is based on this WordPress.org thread.

When you try to update WordPress or install plugins, the downloader / 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’

You need to access the files on your server via FTP. If you haven’t done this before, there are tutorials out there.
Short version: find the FTP access details for your server, and grab FileZilla FTP Client. Or if your hosting provides a File Manager utility, use that.
On your server, navigate to the /wp-content folder.
Create a new folder inside it called TEMP.
Download /wp-config.php from your server to your computer.
Open it up in a text editor, and beneath
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/');
add the line
define('WP_TEMP_DIR', ABSPATH . 'wp-content/TEMP');
then save wp-config.php.
Upload it to your server again.
 Try updating WordPress or installing a plugin. It should work now.

The other solution is not to use Windows hosting!

For more details, see wordpress blog post


Popular posts from this blog

500 Internal Server Error in wordpress

Get Rid of Dark Spots on Face : DIY Natural Remedies

How to send and recieve money on whatsapp