Symptoms
You may receive errors when attempting to "Reinstall WordPress Core" files through the WP Toolkit integrity check feature. The error may be with any of the core files, but the operation will fail:
Failed to reinstall WordPress core files
Task in progress
[error]FailedToExecuteWpCliCommand: exit status 255[/error] Fatal error: Uncaught Error: Class "Requests_IRI" not found in /home/cpuser/public_html/wp-includes/class-requests.php:598 Stack trace: #0 /home/cpuser/public_html/wp-includes/class-requests.php(365)
Description
Specific issues with file corruption may prevent WP Toolkit from completing WP CLI operations on a particular blog. If this happens, it may be necessary to back up the files in wp-includes and redownload the core files.
Workaround
Before doing any of these operations, it is best to take a backup of the account. While these steps should not affect the content of the account, we recommend them just in case:
How to generate a backup of my entire cPanel account from the cPanel interface
Once the backup completes, you can safely address any issues with the files:
- Access the cPanel of the user who owns the blog. This can be done through WHM as the root user, or directly through cPanel
- Navigate to "Files / File Manager" and find the folder that the WordPress blog is installed in
- Locate the "wp-includes" folder, select it, and choose "Rename"
-
Give the folder a unique name such as the following:
wp-includes-backup - Once the rename is complete, return to the cPanel and access "WordPress Management"
- Locate the blog you are working on and select "Check WordPress Integrity."
- Select "Reinstall WordPress Core" and confirm the selection to reinstall the core files.