尝试更新WordPress插件时出错

Our web server hard disk went full overnight and all our sites crashed. We increased hard disk size and then sites were working okay.

Now we found out that we are unable to update plugins automatically from the plugins.php page. We are getting the following error:

Update Failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file '/tmp/woocommerce-customer-order-xml-export-suite-Wa6DIQ.tmp'

See also screenshot: http://imgur.com/a/9969E

What do we need to do to rectify this?

Once this happened to me but with a Windows Server. And I solved doing the following.

  1. I created a folder in wp-content named temp
  2. Then I edit the wp-config and below the following line
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
  1. I paste this line:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/tmp');

And since that moment I stop using Windows as Servers LOL.. And moved to Linux

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');

Taken from: http://birchenough.co.uk/pclzip_err_missing_file-4-missing-archive-file-cwindowstempwhatever-tmp/