WordPress Website Hacked in 2027: Recover Access, Remove Malware and Restore Trust
Visitors are being redirected to unknown websites, the administrator password no longer works, or Google has found pages that your team never published. These may be signs of a compromised WordPress installation. The pri
Visitors are being redirected to unknown websites, the administrator password no longer works, or Google has found pages that your team never published. These may be signs of a compromised WordPress installation. The priority is not to find a one-click cleanup tool. First preserve evidence, protect customers and establish how access was gained; otherwise a site can appear clean and become infected again.
How to recognise a WordPress compromise
- Unexpected administrator accounts, password resets or changes to site settings.
- Unknown redirects, phishing content, pop-ups or suspicious scripts.
- Large numbers of new pages or search snippets unrelated to your business.
- Security warnings from browsers, hosting providers or Google Search Console.
- Unauthorised changes in plugins, themes, uploads, scheduled tasks or the database.
Not every outage is a hack. An HTTP 500 response might be caused by an ordinary PHP failure. The official WordPress guide FAQ: My site was hacked recommends documenting indicators of compromise and recent changes before attempting cleanup. If you have a fatal PHP error but no evidence of intrusion, use our critical WordPress error troubleshooting guide instead.
Your first response: contain the incident
- Record what happened. Capture affected URLs, timestamps, screenshots, notifications and relevant access logs.
- Contact your hosting provider. Ask for assistance preserving logs and isolating the website where necessary.
- Save a snapshot of the affected state. Keep a protected copy of the files and database for investigation, never as a clean recovery image.
- Secure privileged accounts from a trusted device. Start with hosting, domain registrar, business email and other administrative services.
- Assess exposure. If customer data or checkout may have been affected, engage the appropriate privacy and payment stakeholders.
Do not delete the whole site or restore a random backup before collecting the current evidence. This may remove the very information needed to discover the entry point. If the site might serve harmful content, temporarily block public access at the server or CDN level while preserving authorised administrator access.
A safe sequence: document, isolate, preserve, regain control, clean and verify.
Regain access without trusting a compromised session
Confirm that you still control the administrator email and hosting account. If the standard password-reset process fails, a legitimate owner or authorised technician can use trusted hosting administration, WP-CLI or a carefully managed database recovery process. Avoid unfamiliar third-party services offering instant access to your site in exchange for credentials.
Resetting one WordPress password does not mean the site is secure. Audit every administrator and shop manager account, review active sessions and integration credentials, and remove unauthorised access. Once the installation has been cleaned, rotate passwords again and refresh WordPress authentication keys to invalidate older sessions. Enable multifactor authentication for both email and hosting access.
Check more than the plugin directory
Investigation should cover core files, plugins, themes, uploads, wp-config.php, server-side rewrite rules, scheduled jobs and the database. Malicious JavaScript may be stored in widget settings, HTML blocks, header injection options or custom fields. On shared hosting, inspect other installations under the same account; a compromised neighbour can reinfect the website.
Security scanners can identify suspicious files, but a clean scanner report is not proof that every backdoor has been removed. Compare files against trusted vendor packages, examine repository history, review server logs and verify database changes. WordPress documents important access control and configuration protections in Hardening WordPress. For uncertain cases, build a clean staging environment and migrate only validated files and data.
Clean and rebuild from trustworthy components
Replace compromised WordPress core, theme and plugin files with verified distributions from their official or licensed sources. Remove unauthorised users, injected database records, malicious scheduled tasks and unexpected redirects. A backup is useful only if it predates the incident, has been validated and does not overwrite business records that must be retained.
For WooCommerce, a database rollback can erase orders placed after the backup. Reconcile the payment processor's transactions against WooCommerce order records, fulfilment status and stock movements before applying any rollback. Close the original entry point as part of recovery: update or replace vulnerable software, rotate stolen credentials and scan the computers from which administrators accessed the site.
File cleanup alone is insufficient when unauthorised users, database injections and indexed spam remain.
Recover Google visibility after a hack
Open the Security Issues report in Google Search Console and inspect examples of affected URLs. Look for unfamiliar search queries, spam pages, abnormal redirects and unexpected changes to the sitemap. Legitimate restored pages should remain accessible. Permanently removed spam URLs will normally need to return HTTP 404 or 410 rather than being redirected indiscriminately to the home page.
Verify robots directives, canonicals, sitemap entries and meta robots settings. When the entire site has been cleaned and secured, request a security review if the Search Console report offers that option. Google needs to review the site, and search results may take additional time to refresh. A manual action is a separate report and should not be confused with a security warning.
What about online stores and subscriptions?
Investigate payment gateway keys, webhook destinations, order confirmation email settings and any suspicious checkout modification. Do not assume that a payment provider processed compromised transactions safely without checking its own dashboard. For stores operating in the EU, UK or US, assessment of personal-data and payment-card exposure may bring notification duties under applicable law or payment network rules. Obtain specialist advice when warranted.
After cleanup, test product pages, cart, checkout, shipping methods, customer accounts, transactional emails and scheduled actions. Run tests in a safe sandbox, not by re-charging historical customer payments. Verify that discount rules, customer profiles and subscription renewal jobs have not been altered.
Recovery checklist
- Confirm control of hosting, DNS, email and all privileged site accounts.
- Verify clean application files, database content, scheduled jobs and credentials.
- Test forms, ecommerce checkout, shipping, email and integrations.
- Review Search Console, page indexing, redirects, sitemap and canonical URLs.
- Schedule monitored backups, security updates and incident alerts.
Frequently asked questions
Can a hacked WordPress website be recovered?
Often yes, but the process depends on available backups, evidence, access permissions and the depth of the compromise. Recovery should include an investigation into the root cause.
Will a security plugin remove every threat?
No. Scanners provide useful signals, but they cannot guarantee that malicious database changes, credentials or server-level access have been removed.
Is changing the WordPress password enough?
No. Audit hosting, email, integration secrets, administrator accounts and authentication sessions. Rotate credentials again after cleanup.
How quickly will Google remove a malware warning?
There is no guaranteed timeline. Clean the entire site, request a review when appropriate and monitor Search Console for the result.
Professional WordPress recovery
CianBay Studio provides WordPress troubleshooting and website recovery and ongoing maintenance to businesses in Ukraine and internationally. The aim is not just to restore the homepage but to protect orders, regain administrative control and prevent repeat compromise.
Originally published at CianBay Studio.
Disclosure: This article was prepared with AI assistance.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.