Here we explain how to verify the integrity of a WordPress site. In order to identify a possible hack or issue with the WordPress installation files we can run verify-checksums from the domain's document root in command line. The verify-checksums command will evaluate the WordPress installation files and help pinpoint which files have issues.
This process will require an SSH connection to the server or access to cPanel in order to use the Terminal application.
Related Articles
Find the Document Root of a Domain
Verify Checksums
CAUTION: We recommend having a developer check the integrity of the website files if website security is a concern.
- Access the preferred command-line interface
TIP: To use the built-in Terminal application in cPanel, once logged in, just type Terminal in the search bar and click the icon shown. - Navigate to the domain's document root
EXAMPLE: for the primary domain this would be the /public_html directory. To move to the public_html directory use the following command:
cd public_html
- Run the following command after changing into the appropriate directory for the domain's document root:
wp core verify-checksums --version=$(wp core version)
- Review the results
EXAMPLE:Warning: File doesn't verify against checksum: wp-admin/js/post.min.js Warning: File doesn't verify against checksum: wp-admin/js/customize-nav-menus.min.js Warning: File doesn't verify against checksum: wp-admin/js/updates.js Warning: File doesn't verify against checksum: wp-admin/js/customize-nav-menus.js Warning: File should not exist: wp-admin/css/code-editor-rtl.min.css Warning: File should not exist: wp-admin/css/code-editor.min.css Warning: File should not exist: wp-admin/css/code-editor-rtl.css Warning: File should not exist: wp-admin/css/code-editor.css Warning: File should not exist: wp-admin/js/theme-plugin-editor.min.js Warning: File should not exist: wp-admin/js/code-editor.js Error: WordPress installation doesn't verify against checksums.
NOTE: In this example, multiple core files have either been modified or should not exist. The most likely explanation is some sort of hack. A potential solution would be to revert the core files.
Comments
0 comments
Article is closed for comments.