0

I know that there is a command to verify the integrity of the core files:

$ wp core verify-checksums 

In case a file is corrupted or altered, is there any WP-CLI command to automatically restore all those files? E.g. download those files from the official repository and restore.

This could be a useful command to run every 24 hours for example, together with any updates, in order to keep the Wordpress installation intact and safe.

0

Just reinstall the current version of WordPress Core with:

wp core download --force

For a bash script, check here: https://dannyvankooten.com/periodically-check-wp-core-file-modifications/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.