Make My Website Better
mobile menu open icon mobile menu close icon
Contact Us Get a Quote

Fix the WordPress Error: “Update failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file”

Updated November 15, 2022
~ minute read

Content Key

Share this Post :
Get the most out of your marketing
Join over 100,000 of the most intelligent marketers in the universe, and receive marketing news and insights straight to your inbox.
Enter Email to Get Started:
(We will never share your information.)

The Error

The following error tends to appear when updating a plugin from the WordPress plugin panel:

Update failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘/tmp/someverylongrandomfilename.tmp’

Update failed: the package could not be installed. Pclzip_err_missing_file (-4) : missing archive file '/tmp/someverylongfilename. Tmp'

Troubleshooting

When troubleshooting the error, check each of the following. After each effort, attempt the automatic download/update again to help isolate a cause:

Available Disk Storage

Check that your hosting account has enough available storage remaining to download, unpack and replace the plugin files in question. You can typically do this in your hosting account control panel provided by the host (cPanel, etc.).

Update PHP Version

Check that your hosting account is running the most current version of PHP supported by your WordPress installation, theme, other plugins, etc.

Consult the PHP Supported Versions table to see your and other versions’ support and end-of-life status. NOTE: The most current version of PHP may not be supported by your installation if its various components do not help it.

Reset PHP to the current version in CPanel (MultiPHP Manager) or via Your Webhost

You can manage your current version of PHP via your provided hosting control panel. Attempt to reset it to the current version. This has a meager chance of being a cause, so feel free to ignore it.

Manually Set a New /Temp Directory

The error:

Update failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘/tmp/someverylongfilename.tmp’

shows the location where the temporary copy of the plugin files was downloaded (in this case/tmp, which is one tier above the web root of the hosting account usually).

You can reset the temporary directory used by WordPress to download and unpack new plugin versions using the following steps.

First, MAKE SURE YOU HAVE A VIABLE, CURRENT BACKUP of your WordPress installation and database.

If you have access to your WordPress installation files via SFTP, or your control panel, you can alter the WordPress wp-config.php file found in the root of your installation.

First, create a new temporary directory, for example, in the wp-content directory (/wp-content/temp), and set permissions for that directory to 755 (that’s rwxr-xr-x).

Next, download and open the wp-config.php file and edit it as follows.

Toward the end of the file, just beneath the following:

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

…add the following code:

/* Set WordPress temporary directory */
define('WP_TEMP_DIR', ABSPATH . 'wp-content/temp');

Make sure the directory path is shown (e.g., ‘wp-content/temp’) matches the new directory you created above.

This line of code tells WordPress to use the new directory when downloading plugins during the update process.

Save and re-upload the wp-config.php file replacing the previous version.

Is the Plugin Distribution Good?

While unlikely to be the source of your issue, check with the plugin developer and see if others have encountered a similar issue. Some plugins, such as Elementor Pro, experience issues with the automatic update process. Sweeping changes to a plugin may also result in a need for a manual update of the plugin.

Manually Update the Plugin

If the automatic plugin update features continue to fail, you may need to update the plugin file manually.

  1. First, download a copy of the latest version of the plugin from the source (WordPress.org or the developer’s website)
  2. Secondly, ensure you have a backup of the current plugin version installed on your server (the old version, that is). You can download a copy via SFTP, your control panel, or a complete backup of your site from your host.
  3. Then, on the WordPress admin plugins page, deactivate and delete the old version of the plugin.
  4. Next, upload the extracted plugin files to the WordPress directory (typically, /wp-content/plugins/).
  5. Activate the new version of the plugin on the WordPress plugin page and test its function.

Leave a Reply

More Great Posts

The Best Venues for Team Building and Corporate Events in Seattle
Thrive News

The Best Venues for Team Building and Corporate Events in Seattle

Seattle is best known for grunge music, Starbucks and the Pike Place Market. It’s also home to a booming tech industry that was greatly impacted by the global pandemic and was forced to transition many of its operations to a work-from-home setup. With 2023 just around the corner, it’s an exciting time to set new… Read More »

Read More »
Advertise with us
Join our advertising network to grow your business. Give us a call at (702) 904-4262
34.99 WordPress Updates | WordPress Support by 702 Pros
Sponsored
Build your Rank Ad 1 - RankLabel
Sponsored
Kyla Sloan | Kyla Estes | Client Management | Reception | Sales
Advertising with Us
Kyla SloanAdvertising Specialist
Our team has the digital and traditional marketing skills to get you in front of customers looking for your product or service.
Want to talk now? Give us a call at (702) 904-4262

Powered by OnSago

Add Your Business To the 702 Pros' Directory
Please add some general information about your business.
Want to talk now? Give us a call at (702) 904-4262

Powered by OnSago

2022 Sale

Get 20% off!

All Web Design Packages
Days
Hours
Minutes
Seconds
Want to talk now? Give us a call at (702) 904-4262

Powered by OnSago