If wordpress detects that it cannot write files to this temp directory, then you get the error message like
“The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘\TEMP/akismet.tmp ” .
You can work around this by specifying a 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 named “temp”
Try again, you will see it works.
- Hits: 290
How to resolve Issue in installing and updating Plugins in WordPress Hosting