Symptoms
When performing an integrity check via wp-toolkit, you may run into the following error.
Failed to reinstall WordPress core files
Error: Extracting a zip file requires ZipArchive.
Downloading WordPress 5.8.1 (en_US)...
Description
The error above shows that when wp-toolkit attempts to extract the files during the integrity check, it's unable to due to not being able to access or use the PHP 'ZipArchive' extension.
Workaround
For Wp-Toolkit to perform this function, it requires multiple settings. The first would be to make sure that the PHP memory limit for the versions the user uses is set to at least 64Mb. Secondly, the server should have ea-libzip installed and the ea-php##-php-zip extensions. Steps on how to do this will be in the articles below.
How to install a PHP version using Easy Apache
How to install a PHP extension using Easy Apache
How to set or increase PHP INI memory limit or other values