What it checks
Detects files added, changed or deleted since the approved baseline (sha256).
Check ID: files.integrity
Each file in the scan targets is compared with the baseline: the fingerprints (sha256) of the files you approved as the trusted state. The scan targets are the themes and custom plugins you selected and the directories outside WordPress you registered.
The first scan of a target records its files as the baseline automatically, so that scan reports no changes. After that, every file that was added, changed or deleted since the approval is reported.
When you changed the files yourself (an update or a deployment), run a scan and then approve the new state. See Approving the baseline after a deployment.
What a finding means
The titles, severities and explanations below are the ones shown on the Findings screen.
| Finding | Severity | Meaning |
|---|---|---|
New fileintegrity.added | High Medium Low | This file was added after the baseline was approved. High: PHP files and .htaccess. Medium: .js, .mjs, .html, .htm, .svg and .json. Low: other files. |
File changedintegrity.modified | High Medium Low | The contents of this file differ from the approved baseline. High: PHP files and .htaccess. Medium: .js, .mjs, .html, .htm, .svg and .json. Low: other files. |
File deletedintegrity.deleted | Medium Low | This file is in the baseline but no longer exists. Medium: PHP files. Low: other files. |
File could not be readintegrity.unreadable | Info | The file exists but PHP cannot read it, so changes cannot be detected. |
How to fix
The recommended action shown with each finding:
- New file
If you deployed this file, approve the current state as the baseline. Otherwise inspect it and remove it if it is not yours. - File changed
If the change was a planned deployment, approve the current state as the baseline. Otherwise compare the file with your source and restore it. - File deleted
If you removed it on purpose, approve the current state as the baseline. - File could not be read
Check the file permissions.
Related settings
- Settings → Targets: Themes to scan, Plugins to scan and Directories outside WordPress decide which files are checked. Each registered directory has its own Checks and exclusions.
- Settings → Checks → Enabled checks: switch “File integrity” on or off.
- Settings → Checks → Exclude patterns: files and folders that are not checked (by default
node_modules,vendor,.git,.svnandcache). - Settings → Checks → Maximum files per target: 20,000 by default. When a target has more files, the rest are not checked and a “File limit reached” finding is shown.
- Settings → General → File baseline: approve the current state of one target or of all targets. See Approving the baseline.