Blueprints · WordPress
Beginner
10 min · Linux
WordPress core checksum check
Runs wp core verify-checksums when WP-CLI is installed. It does not update core.
Live config
Baked-in protections
- Checksums are verified, not rewritten
- A mismatch is printed
- Plugins are a separate update
Step 1 · bash
Read-only check
/root/portgate-blueprints/wp-checksum.sh
Verifies core checksums. It does not download WordPress.
#!/bin/sh set -eu if command -v wp >/dev/null 2>&1 && [ -f "/var/www/html/wp-load.php" ]; then wp --path="/var/www/html" core verify-checksums || echo "Checksum verification failed." else echo "WP-CLI or WordPress is not available." fi
Step 2 · text
Follow-up
/root/portgate-blueprints/wp-checksum.txt
If checksums fail, update core from a backup window. Do not delete wp-content.
wp core update Take a database backup first. Unexpected PHP files outside core are a malware finding, not a checksum update.