Illustrative scenario: professional services firm with a compromised WordPress website
Recovering and hardening a compromised business website
A professional services firm discovers its website is redirecting visitors to spam pages and has been flagged by browsers. This scenario shows how SupportSafe would contain the incident, remove the malware, close the entry point and harden the site against repeat attacks.
This is an illustrative scenario that shows how we would approach a typical engagement. It does not describe a specific client, and outcomes describe what the work is designed to achieve and how success would be measured.
The challenge
In this scenario, a professional services firm (for example an accountancy or consultancy practice) relies on its WordPress website for credibility and new enquiries. One morning, staff notice that some visitors arriving from search results are being redirected to unrelated spam pages, and a browser shows a security warning. Enquiries through the contact form have stopped.
What the business is experiencing
- Reputational damage. Prospective clients see warnings or spam content, which undermines trust in a firm that handles confidential information.
- Lost enquiries. The contact form appears to work, but messages are not arriving.
- Search visibility at risk. Search results show spam titles for some pages, and the firm is concerned about its rankings.
- Uncertainty. Nobody knows how the attacker got in, whether client data was exposed, or whether restoring an old backup would simply reinstate the problem.
What an investigation is likely to find
- An outdated plugin with a publicly disclosed vulnerability that allows unauthenticated file uploads, used as the entry point.
- Malicious PHP files hidden in the uploads directory and disguised as legitimate core files.
- Injected code in the theme that redirects visitors arriving from search engines while hiding the redirect from logged-in users.
- A new administrator account created by the attacker.
- Spam pages generated in the database for search engines to index.
- Outgoing email from the server being used for spam, which affects the domain's email reputation and helps explain the missing form messages.
- Backups that go back only a short time, all of which may already contain the malicious files.
What has been tried so far
- A staff member deleted a suspicious file they found, but the redirects returned within hours because a hidden backdoor remained.
- The hosting provider suspended outgoing email from the account to protect its network, which is why enquiries stopped arriving.
- A free online scanner reported the site as "clean", because the redirect only triggers for visitors arriving from search engines.
These partial fixes are common and understandable, but they show why a compromise needs a structured investigation rather than a quick clean-up of visible symptoms.
Why it matters
A compromised website is a business incident, not just a technical one. It affects client trust, search visibility and email deliverability, and in some cases may trigger obligations under data protection law, such as GDPR. The firm needs the site cleaned quickly and thoroughly, the entry point closed, and clear evidence it can use to decide on any further steps with its own advisers.
Our approach
SupportSafe would treat this as an emergency engagement with a defined severity level, followed by hardening and ongoing protection. The priority is to contain the incident without destroying evidence, then clean, verify and harden.
Contain
- Take a forensic copy of the current files, database and available logs before making changes.
- Put the site into maintenance mode or behind a web application firewall (WAF) rule set to stop visitors being redirected.
- Reset all passwords: WordPress users, hosting control panel, SFTP, database and email. Revoke unknown sessions and remove the attacker's administrator account.
Investigate
- Review access logs and file modification times to identify the likely entry point and timeline.
- Compare core, theme and plugin files against known-good copies from official sources.
- Search the database for injected content, spam pages and malicious options.
- Establish, as far as the evidence allows, whether personal data held on the site may have been accessed, and document findings for the firm and its advisers.
Clean
- Replace WordPress core, themes and plugins with fresh copies from official sources rather than editing infected files.
- Remove malicious files from the uploads directory and block PHP execution there.
- Clean injected database content and remove spam pages.
- Update or replace the vulnerable plugin, and remove unused plugins and themes.
Harden
- Enforce multi-factor authentication for administrators and apply least-privilege roles.
- Put a WAF in front of the site and enable login rate limiting to reduce brute-force attempts.
- Set correct file permissions, disable file editing from the dashboard and update PHP to a supported version.
- Configure SPF, DKIM and DMARC for the domain so that form notifications are sent through an authenticated mail service.
Recover visibility and protect
- Request reviews from browser safe-browsing services and search engines once the site is clean.
- Set up off-site backups with a retention period long enough to predate a slow-burning compromise, and verify a restore.
- Enable ongoing security monitoring, file integrity checks and uptime monitoring.
Intended outcomes and how they're measured
This engagement is designed to return the firm's website to a clean, trustworthy state and to make a repeat compromise considerably less likely. The outcomes below describe the intended results and how they would be measured; they are not results from a real firm.
A clean, verified website
- Aim: remove all malicious code and content, not just the visible symptoms.
- Success measured by: core, theme and plugin files matching known-good copies; no malicious files detected by follow-up scans; no injected content in the database; no unexpected administrator accounts.
The entry point closed
- Aim: prevent the same route being used again.
- Success measured by: the vulnerable plugin updated or replaced; PHP execution blocked in the uploads directory; all credentials rotated; a written incident summary identifying the likely entry point and timeline.
Restored trust signals
- Aim: remove browser warnings and spam results so prospective clients see the real site.
- Success measured by: safe-browsing and search engine review requests submitted and accepted; spam URLs returning appropriate status codes; enquiries arriving reliably through the contact form, confirmed by test submissions.
Stronger defences
- Aim: reduce exposure to the most common attack types.
- Success measured by: MFA enforced for every administrator; a WAF and login rate limiting active; SPF, DKIM and DMARC records published and passing; security monitoring and file integrity alerts routed to a named contact.
Recoverability
- Aim: if anything does go wrong again, the firm can recover from a known-clean point.
- Success measured by: off-site backups with an appropriate retention period, and a documented restore test passing.
SupportSafe can support the technical side of an incident, but it does not provide legal advice. Decisions about notifying regulators or clients under GDPR remain with the firm and its advisers. No website can be made unhackable; the aim is to make a repeat incident much less likely and much quicker to detect.
Services used in this scenario
Malware Detection & Removal
Calm, methodical cleanup of infected websites: containment, malware removal, root-cause analysis, delisting requests and hardening to help prevent reinfection.
Learn moreWordPress Security
WordPress-specific hardening, plugin risk management, login protection and monitoring, maintained by engineers who work with WordPress every day.
Learn moreWebsite Firewall Management
Setup, tuning and ongoing management of web application firewalls, rate limiting and bot rules, so malicious traffic is filtered without blocking customers.
Learn moreEmergency Website Support
Urgent help for website outages, hacked sites, broken checkouts and expired certificates, with response targets defined in your SLA or emergency engagement.
Learn moreFacing a similar situation?
Tell us about it. We'll assess your setup and explain how we'd approach it – before you commit to anything.