01

Contain without destroying the story

The first priority is limiting harm while preserving enough evidence to understand scope. Avoid blindly deleting suspicious files or immediately restoring over the environment. Record observed behavior, recent changes, access paths, infrastructure events, and timestamps. Restrict exposure and establish a secure communication path for the people responsible.

02

Cleanup must address persistence

Visible spam or a malicious redirect may be only the symptom. Response should examine modified files, unexpected administrators, database content, scheduled tasks, writable locations, credentials, plugins, themes, and infrastructure access. Recovery should use known-good sources wherever possible, followed by validation that the malicious behavior and persistence mechanisms are gone.

Security and performance become manageable when ownership, evidence, and response paths are explicit.
03

Recovery is not completion

After service is stable, rotate relevant credentials, patch or remove the entry condition, reduce unnecessary access and software, review backups, strengthen monitoring, and document what happened. The post-incident record should separate confirmed facts from assumptions and turn lessons into owned actions. Otherwise the organization has restored availability without materially reducing recurrence.

04

Recognize the signs without jumping to conclusions

Possible compromise indicators include unexpected redirects, spam pages, unfamiliar administrators, modified core files, new PHP files in unusual locations, search results that do not match the site, security alerts, unexplained resource usage, and different content shown to crawlers. Any one signal may have a legitimate explanation. Generated cache files, premium-plugin modifications, staging artifacts, and hosting tools can look suspicious when context is missing. The response should therefore preserve evidence and verify conditions before declaring a cause. Record exact URLs, timestamps, screenshots, email alerts, recent releases, access changes, and who observed the behavior. Avoid repeatedly visiting malicious pages from ordinary workstations. A calm intake makes later decisions more accurate and reduces the chance that well-intentioned cleanup destroys the evidence needed to identify persistence or scope.

05

Establish authority, roles, and a secure channel

Incident response moves faster when responsibilities are explicit. Identify the person authorized to approve containment, downtime, credential rotation, hosting changes, and stakeholder communication. Establish a secure communication channel that does not depend on potentially compromised website accounts. Limit technical access to the people actively working the event and record who receives credentials. Decide how updates will separate confirmed facts, working hypotheses, actions completed, and open decisions. If personal, financial, health, or regulated data may be affected, legal and privacy advisors may need to determine notification obligations. Technical responders should not make those determinations alone. Clear roles prevent contradictory actions, reduce information leakage, and let specialists focus on restoring trustworthy service.

06

Containment should reduce harm while preserving options

Containment depends on consequence. A redirecting marketing site may be placed into maintenance mode, while an ecommerce or service platform may require more targeted restrictions. Possible actions include limiting administrative access, blocking malicious routes, disabling a vulnerable component, restricting origin traffic, suspending file changes, or isolating the environment. Do not assume that taking a site offline removes persistence or protects credentials. Preserve relevant logs, file metadata, database state, configuration, and alerts before broad replacement when feasible. Document each change and its time so responders can distinguish attacker activity from remediation. The objective is to stop ongoing harm, prevent additional change, and create a stable basis for investigation—not to make the site look normal as quickly as possible.

07

Determine scope across files, database, access, and infrastructure

WordPress compromise can live in more than plugin files. Investigation should examine core integrity and extra files, themes, plugins, must-use plugins, uploads, writable cache locations, configuration, administrators, application passwords, database posts and options, scheduled tasks, server cron, PHP configuration, access logs, deployment paths, hosting accounts, and DNS. Search for known indicators, but also look for behavior: recently modified loaders, obfuscated execution, unexpected outbound requests, conditional redirects, unauthorized rewrite rules, and code that activates only for certain user agents. Compare live behavior for ordinary visitors and crawlers when cloaking is suspected. Scope should include connected systems if credentials or integrations may have been exposed. Absence of one known filename is not evidence that the environment is clean.

08

Quarantine evidence and rebuild from trusted sources

High-confidence malicious artifacts should be moved into a protected quarantine outside the public document root rather than deleted immediately. Record paths, ownership, permissions, timestamps, hashes, and relevant content samples. Replace compromised WordPress core directories and files from the exact official release, while preserving `wp-content` and configuration only after review. Reinstall affected plugins or themes from trusted vendor packages instead of editing suspicious code in place. Review custom code directly. Extra files inside core directories must be removed or quarantined because overwriting official files will not eliminate them. Database content, administrators, cron jobs, and configuration require separate validation. A trustworthy rebuild is a controlled reconstruction, not a blanket copy that carries the compromise forward.

09

Rotate credentials according to exposure

Credential rotation should follow an inventory rather than focus only on the WordPress administrator password. Consider WordPress users, application passwords, hosting panels, SSH and SFTP, database credentials, deployment tokens, API keys, email services, DNS, CDN, backup systems, and third-party integrations. Prioritize credentials that could have been read from the compromised environment or used to create persistence. Remove obsolete users and shared access, enable strong multifactor authentication where available, and avoid transmitting new secrets through the same channel used during the incident. Rotation can disrupt integrations, so record dependencies and validate them. Changing credentials before access pathways are understood may alert an attacker or leave hidden sessions active; changing them too late may permit reinfection. Sequence matters.

10

Validate recovery before normalizing service

A recovered site should pass multiple checks. Official WordPress core checksums should verify, unauthorized extra files should be absent from live directories, affected plugins and themes should come from trusted sources, and reviewed custom code should match its repository or approved baseline. Administrator and service accounts should be confirmed. Critical pages, forms, redirects, search, authentication, commerce, and integrations should work. A safe execution test should confirm that PHP-like files cannot run inside uploads at both the public edge and origin where relevant. Homepage health, response headers, caching, logs, and monitoring should be observed after server reload. Validation results should be retained with the incident record. Recovery is trustworthy when evidence supports the conclusion, not merely when the visible symptom disappears.

11

Harden the WordPress and hosting baseline

Post-incident hardening should address the conditions that increased likelihood or impact. Remove unused plugins, themes, accounts, and public files. Update supported software and plan replacement for abandoned dependencies. Disable dashboard code editing where appropriate, apply least privilege, protect configuration and secrets, correct ownership and permissions, block executable files in upload paths, restrict management interfaces, and review web-server rules. Confirm backups are isolated and restorable. Add uptime, integrity, vulnerability, certificate, and performance monitoring with a named escalation path. Controls must be verified in the actual hosting environment: an Apache rule provides no protection if OpenLiteSpeed or Nginx ignores it. Hardening should improve security without making legitimate publishing impossible.

12

Write the post-incident record

A useful record explains what was observed, when the event was detected, what systems were in scope, which facts were confirmed, what remained uncertain, and which actions were taken. Include evidence locations, quarantined artifacts, hashes where appropriate, credential rotations, software replaced, controls added, validation results, downtime, and stakeholder decisions. Identify the likely entry condition only when evidence supports it; do not convert correlation into certainty. Separate immediate remediation from longer-term improvements and assign owners and dates. The record supports legal or insurance review when needed, prevents repeated investigation, and gives future maintainers a known baseline. It also improves communication: leadership can understand consequence without reading raw scanner output, while technical teams retain enough detail to verify the work.

13

Move from emergency response to proactive security

The most valuable outcome is not a clean scan on the day of recovery. It is an operating model that makes the next unauthorized change harder, more visible, and less damaging. Establish risk-based updates, regular access review, dependency ownership, backup observation, restore testing, integrity monitoring, performance baselines, and a secure escalation path. Review logs and security signals in proportion to business consequence. Test controls after hosting or deployment changes. Maintain an inventory of custom plugins, integrations, secrets, and responsible owners. Conduct periodic WordPress security audits that examine the whole system rather than repeating vulnerability exports. No provider can guarantee that a connected website will never be compromised. Proactive security reduces exposure, shortens uncertainty, limits impact, and gives the organization a practiced way to recover.