If you encounter the error The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file when trying to install or update a plugin or theme, it can be a simple fix (although frustrating to deal with when first encountering it). The key to what’s going on is in the message, and it relates to a missing folder necessary to update plugins and themes.
At some stage you may encounter the message above and the cause can be from an accidental removal of a temp folder or misconfigured file. Thankfully though, you can be back up and running in next to no time by applying the fix to The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file. This is how to fix it.
1. Go to Your wp-content folder. You can access the wp-content folder by using a file manager on your hosting or using FTP. The location will be domain/wp-content (where domain is the website domain name)
2. When you are in wp-content create new folder under wp-content and call it temp.
3. Download your wp-config file from your server to your computer. This is just in case you make a mistake and have a backup which you can quickly restore. Open the wp-config file and search for the following line of code.
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
4. Add following line of code after that line.
/*Set WordPress temporary directory */
define('WP_TEMP_DIR', ABSPATH . 'wp-content/temp');
5. Save the wp-config.php file. If you edited it on your PC upload it to the website
This will solve the The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file error and allow you to upload and update themes and plugins.
https://learnwp.swiftdesigns.com.au/how-many-plugins-are-too-many-on-a-wordpress-website/Now read how many plugins are too many for a WordPress website