All of a sudden, I got an error trying to update my WordPress plugins. The error message is something like “Update Failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing…..”
Some people suggest the following steps:
1. Open wp-config.php
2. Scroll down to the line ‘if ( !defined(‘ABSPATH’) ) define(‘ABSPATH’, dirname(__FILE__) . ‘/’);‘
3. Below it, write code “define(‘WP_TEMP_DIR’, ABSPATH . ‘/tmp’);” then Save the file.
4. Create folder named ‘tmp’ in ‘public_html’ or at ‘wp-content’. e.g. wp-content/tmp
5. Click ‘tmp’ folder and click manage permission.
6. Check all the boxes (The folder should be writable)
Why all of a sudden, things stop working? Are my WordPress files corrupted? How about I re-install WordPress? There is also an error saying “Downloading update from https://downloads.wordpress.org/release/wordpress-5.5.1-no-content.zip Download failed.: The checksum of the file () does not match the expected checksum value…..”
Some people suggest a manual update:
Get the latest WordPress zip (or tar.gz) file.
Unpack the zip file that you downloaded.
Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
Upload all new loose files from the root directory of the new version to your existing WordPress root directory.
Hmm, there must be some other easy way. What about, I restart the server? After a restart, both re-install and plugin updates work without any complaint.