Subtle diagonal pinstripe pattern in light grey and cream, giving an impression of printed editorial paper

Monitor WordPress file integrity with checksums and alerts

WordPress file integrity monitoring gives administrators an early warning when a core file, plugin, theme, configuration file, or uploaded script changes without a known deployment. It answers a practical question: has the code on this server been altered? A checksum records the current content of a file, so two scans can reveal additions, removals, and modifications. That makes the technique useful for small business sites as well as managed WooCommerce stores, where a quiet compromise can otherwise continue unnoticed.

Checksums do not scan for malware, repair a hacked site, or establish whether a change was authorised. They provide evidence of drift between an approved state and the live state. The strongest setup combines a trusted baseline, a repeatable comparison, and an alert that reaches a person able to investigate. Official WordPress and plugin checksums can help validate distributed packages, while custom code, mu-plugins, security rules, and site-specific configuration require a baseline created for that installation.

A sound workflow defines the files in scope, records their SHA-256 hashes, schedules comparisons, classifies each difference, and retains an audit trail. Critical executable changes should be surfaced quickly; routine updates can follow a calmer path. The workflow should also tolerate normal WordPress maintenance, such as plugin upgrades, without training the team to ignore every notification. Monitoring is most valuable when it supports a decision, rather than merely producing a daily list of changed paths.

Australian administrators need to account for local hosting conditions. Many agencies run client workloads in AWS regions around Sydney and Melbourne, or on Brisbane VPS and cPanel servers, while using shared dashboards hosted elsewhere. That mixed estate favours portable, read-only checks and clear ownership. Local alert times should use Australia/Sydney during daylight saving and Brisbane time on standard time, with UTC as the dependable scheduling reference.

Establish a trustworthy baseline

Start by defining the baseline’s scope. Include WordPress core, active and inactive plugins, themes, must-use plugins, drop-ins such as advanced-cache.php, wp-config.php, and relevant server rules. Watch wp-content/uploads separately: photographs and exports are noisy, but PHP, shell scripts, and executable-looking files deserve immediate review. Record file paths, SHA-256 values, ownership, permissions, and the WordPress, plugin, and theme versions that produced the baseline.

On a known-good build, a shell command can create a basic manifest for a production path. Keep the output outside the web root so the scanner does not flag its own files, and run the command with an account that can read every target:

find /srv/wordpress/wp-admin \
     /srv/wordpress/wp-includes \
     /srv/wordpress/wp-content/plugins \
     /srv/wordpress/wp-content/themes \
     -type f -print0 | sort -z | xargs -0 sha256sum \
     > /srv/monitoring/wordpress-files.sha256

Treat a generated manifest as evidence rather than an unquestionable authority. Official WordPress.org checksums and WP-CLI can validate core and distributed plugins against their release packages, but custom plugins, bespoke themes, and site-specific drop-ins still depend on an approved internal copy. Store baselines in a version-controlled repository or access-controlled object storage, separated from the web server. Keep a previous immutable copy, include the site identifier and creation date, and restrict who can replace the reference after a release.

Compare files and classify changes

The checker should fetch the current manifest and compare it with the baseline outside the document root. Running the comparison only through a compromised WordPress installation can give misleading results because an attacker may control the scanner, alter its output, or hide modified files. A separate runner with read-only file access is more dependable. Paths must be normalised consistently, and the comparison process must never execute or render changed content to decide whether it is safe.

Report additions, deletions, and modified files separately. A deleted security plugin deserves attention even though no replacement hash exists, while a new PHP file in an uploads directory can indicate a webshell. By contrast, a modified stylesheet may reflect an approved theme deployment. Modification times are supporting evidence only because they can be changed and are often reset during extraction or file copying. The checksum comparison and the deployment record should determine whether an event is expected.

Official releases add another verification layer. The WP-CLI command wp core verify-checksums validates core files against WordPress.org, while wp plugin verify-checksums --all checks published plugins. Neither command understands custom code or whether an update was approved by the site owner. Run them with the correct service account, capture their output, and combine the results with the installation-specific baseline. This combination distinguishes upstream package changes from local modifications.

Schedule scans and route alerts

Avoid relying on WordPress cron for critical integrity checks. Cron events depend on traffic, may be disabled by hosting providers, and can stop running when WordPress itself fails. Use a systemd timer, a provider-managed scheduler, or an external runner to perform the comparison at regular intervals. A short interval suits high-risk production stores, while less active sites can use a practical schedule without sacrificing escalation coverage. Restrict the scanning account to read access and limit it to the directories covered by the baseline.

Each alert should identify the site, environment, detection time, affected path, change type, old and new hashes, severity, and a link to the review procedure. Use UTC in stored events and show the relevant Australian local time beside it. Australian teams often prefer a 24-hour clock and dates such as 06/05/2026, which removes ambiguity between day and month. The alert should also state whether the event matches a known deployment window, since that context prevents a legitimate release from consuming emergency capacity.

Choose channels according to the response required. Email suits lower-priority changes, chat works for rapid acknowledgement, and SMS or a phone escalation may be appropriate for critical executable changes. Teams that pass warnings into another communication workflow can consult the linked message delivery guidance when defining that handoff, while the monitoring system remains responsible for keeping the event record complete. Apply grouping and rate limits so repeated scans do not create dozens of duplicate messages, but ensure that an unresolved critical event continues to escalate.

Secure the monitoring workflow

Keep the scanner, baseline, and notification credentials outside the public web root. An account with broad filesystem access, database privileges, or permission to deploy code creates avoidable risk. Use separate read-only credentials for collection and narrowly scoped credentials for alerting. Protect the baseline repository with multifactor authentication, maintain an audit log of every replacement, and rotate credentials when personnel or hosting responsibilities change. A scanner located on another network can also distinguish a file change from a simple monitoring outage.

Treat monitoring logs as operational data that may contain personal information. WooCommerce and WordPress logs can include customer identifiers, staff usernames, IP addresses, request paths, and details connected to an order. Minimise the fields included in alerts, redact sensitive values, set a retention period, and apply the Australian Privacy Act and other applicable obligations where the site handles personal information. The audit trail should prove what changed and who reviewed it without becoming a secondary store of unnecessary customer data.

The Australian Signals Directorate’s ACSC provides guidance for detecting and responding to malicious cyber activity, including advice to preserve evidence and report significant incidents through its reporting process. Monitoring records can support that response by establishing when the first drift appeared, which paths changed, and whether access continued after detection. They should be time-synchronised and retained securely enough for investigators to use them later, but they must not be treated as proof that an incident occurred without supporting investigation.

Validate alerts and rehearse response

Test the complete chain in a staging environment before trusting it in production. Modify one harmless text file, add a test PHP file in an isolated directory, remove a non-critical fixture, and deploy a known plugin update. Confirm that the scanner detects each change, calculates the correct severity, creates an immutable event, and sends a message to the intended recipient. Also simulate an inaccessible server and an expired API credential so that monitoring failures produce a distinct alert instead of appearing as a clean result.

Maintain a short runbook for confirmed changes. It should identify who may isolate the site, who can restore files, how credentials are rotated, and where the provider or agency must be contacted. Preserve logs and relevant files before remediation, compare suspect code with a clean package or internal baseline, and reinstall affected components from trusted sources. Do not automatically overwrite every mismatch, since a restored file can remove evidence or undo a legitimate change. Critical events involving WordPress core, wp-config.php, authentication plugins, or executable uploads require careful containment and credential review.

Rehearse the response at intervals and include scenarios relevant to Australian operations. A team may need to cover public holidays, different state time zones, an overseas hosting provider, and support provided by an agency in another city. Measure acknowledgement and resolution times rather than merely counting emails. Tune noisy rules after each test, but never suppress a whole class of executable changes merely to make the queue look clean. A critical alert should have a named escalation path, even when the responsible administrator is unavailable.

Maintain a sustainable monitoring routine

WordPress maintenance creates legitimate file changes, so baseline management must form part of the release process. Regenerate the reference after an approved plugin or theme update, core upgrade, custom deployment, or emergency restoration. Keep the previous baseline for comparison and record the reason for each replacement. Incomplete updates often leave mixed file versions, while an outdated baseline can create a flood of false differences. The baseline should describe one coherent, approved state whenever practical.

Maintain an inventory that maps each monitored path to its owner, purpose, update method, and acceptable source. Include less visible locations such as must-use plugin directories, security plugins, server-level configuration, and custom cron scripts. Measure coverage by identifying assets without a baseline and by tracking unexplained changes that remain unresolved. Periodic manual reviews of the inventory help catch files omitted during a directory restructure, a migration to Australian infrastructure, or the addition of a new staging environment.

Portable tools and consistent manifests suit the Australian market well because agencies frequently manage cPanel servers, local VPS instances, and cloud platforms with different access models. Store site metadata in a standard format, avoid vendor-specific path assumptions, and document the exact command used for each environment. With protected baselines, timely comparisons, tested escalation, and disciplined baseline updates, checksum drift becomes an accountable security signal rather than an occasional surprise discovered months later.