Hacked WordPress Site Recovery: 12 Steps to Clean and Secure Your Site

Hacked WordPress site recovery is stressful, urgent and easy to get wrong. A site that redirects visitors to spam, shows a Google “This site may be hacked” warning, sends junk email or suddenly has new admin users needs a calm, methodical response. This guide gives you a twelve-step recovery plan, explains how to find the way the attacker got in, and shows how to stop it happening again.

It is written for business owners, marketers and agencies who manage WordPress or WooCommerce sites and need to act quickly without making the damage worse.

Key takeaways

  • Successful hacked WordPress site recovery means removing every backdoor, not just the visible spam.
  • Take a full backup of the infected site before you change anything, so evidence and data are preserved.
  • Reset every password and key: WordPress users, hosting, database, FTP/SFTP and API keys.
  • Find and close the entry point, or the site will be reinfected within days.
Hacked WordPress site recovery steps and security checklist

Signs your WordPress site has been hacked

  • Visitors, especially on mobile or from Google, are redirected to other sites.
  • Google Search shows spam titles in Japanese or pharmaceutical keywords for your domain.
  • Browsers or Google Search Console show security warnings.
  • Unknown admin users, plugins or files appear.
  • Your host suspends the account or reports malware or spam email.
  • The site becomes very slow or CPU usage spikes for no reason.

If you see any of these, start hacked WordPress site recovery straight away. The longer malware runs, the more it spreads through files, the database and search results.

Hacked WordPress site recovery: 12 steps

1. Stay calm and put up a maintenance page

If visitors are being redirected or attacked, put the site into maintenance mode at the server level or ask your host to restrict access while you work. For an online store, tell customers briefly that you are carrying out maintenance.

2. Back up the infected site

Download a full copy of the files and database before cleaning. You may need it to recover orders, content or evidence, and to compare files later.

3. Change every password

Reset hosting control panel, SFTP, database and all WordPress administrator passwords. Remove any user you do not recognise. Generate new WordPress salts and keys in wp-config.php, which logs everyone out.

4. Scan files and database

Use a reputable security scanner and your host’s malware scan, then review results manually. Look for unfamiliar PHP files in uploads, obfuscated code using functions such as eval or base64_decode, and suspicious entries in the options and posts tables.

5. Replace WordPress core files

Download a fresh copy of WordPress and replace the wp-admin and wp-includes folders and root core files. Keep wp-config.php and wp-content, but inspect them carefully.

6. Reinstall plugins and themes from clean sources

Delete every plugin and theme and reinstall fresh copies from WordPress.org or the vendor. Remove anything abandoned, nulled or unused; this step alone fixes a large share of hacked WordPress site recovery cases. Pirated “nulled” premium plugins are a very common source of infections.

7. Clean the uploads folder

The uploads folder should contain media, not PHP. Remove executable files from it and block PHP execution there at the server level.

8. Clean the database

Search for injected scripts, spam links and rogue admin accounts. Check the site URL and home settings, widgets, and any options that load code on every page.

9. Check server-level files

Look at .htaccess files, cron jobs, and any other sites on the same hosting account. A single infected site on shared hosting can reinfect its neighbors.

10. Find the entry point

Review server access logs, the list of recently changed files and plugin versions. Common causes are outdated plugins with known vulnerabilities, weak or reused passwords, nulled software and insecure hosting. Hacked WordPress site recovery is not finished until this question has an answer.

11. Request a review from Google

Once clean, check the Security Issues report in Google Search Console and request a review. Remove spam URLs that Google indexed by returning 404 or 410 responses and submitting an updated sitemap.

12. Monitor closely

Watch file changes, new users and traffic for several weeks. Reinfection in the first days usually means a backdoor was missed and hacked WordPress site recovery has to start again. If you want an independent check afterwards, our free website audit covers security basics.

The WordPress.org guide “FAQ: My site was hacked” is a useful companion to these steps.

A hacked WordPress site recovery checklist for stores

WooCommerce stores need a few extra steps, because they hold customer and order data and process payments. Add these to the twelve steps above:

  • Check the checkout: look for injected JavaScript on cart and checkout pages that could skim card details, and review any payment plugin files.
  • Rotate payment and API keys: regenerate keys for Stripe, PayPal, Razorpay or other gateways, plus shipping and email marketing integrations.
  • Review orders and customers: look for fake accounts, odd orders or changed refund settings.
  • Notify where required: if personal or payment data may have been exposed, take advice on your legal and payment-provider obligations.
  • Test every payment method after cleaning, before reopening the store.

Hacked WordPress site recovery for a store is about trust as much as technology. Customers who see a clean site, a working checkout and no strange redirects quickly forget the incident, as long as the fix is thorough.

Restore from backup or clean in place?

If you have a clean backup from before the infection, restoring it can be the fastest route. But you still need to update everything, change passwords and close the entry point, or the attacker will return. You may also lose orders, comments or form entries made since the backup. Many hacked WordPress site recovery jobs combine both: restore clean files, then carefully merge newer database content.

How to stop it happening again

  • Keep WordPress core, plugins and themes updated, ideally tested on staging first.
  • Use strong unique passwords and two-factor authentication for every admin.
  • Limit admin accounts and give people the lowest role they need.
  • Remove unused plugins and never install nulled software.
  • Use good hosting with isolation between sites, a web application firewall and malware scanning.
  • Keep automatic daily backups stored off the server, and test restoring them.
  • Monitor uptime, file changes and Search Console security reports.

A website maintenance plan covers most of this list, so security does not depend on someone remembering.

When to call a professional

Do-it-yourself hacked WordPress site recovery is possible for a simple blog. Get professional help if the site handles payments or personal data, if it was reinfected after cleaning, if Google has blocklisted it, or if your host has suspended the account. Stores that process customer data may also have legal obligations to assess whether personal data was exposed.

Frequently asked questions

How long does hacked WordPress site recovery take?

A straightforward infection can often be cleaned within a day. Complex cases with many sites on one account, database injections or Google blocklisting can take several days, plus time for Google’s review.

Will I lose my SEO rankings?

Spam pages and warnings can hurt rankings and click-through rates. Most sites recover once they are cleaned, spam URLs are removed and Google’s review is approved.

Is a security plugin enough?

Security plugins help with scanning and hardening, but they cannot replace updates, strong passwords, good hosting and backups.

Should I rebuild the site instead?

If the site is old, unmaintained and full of abandoned plugins, a rebuild on a clean, lightweight setup can be the better long-term choice.

Would you rather have it done for you? AirWebs cleans infected WordPress and WooCommerce sites, finds and closes the entry point, handles Google review requests and then keeps the site patched. If you need a hacked WordPress site repair service or a WordPress malware removal service you can reach on WhatsApp, see our website maintenance service.

Site hacked right now? Message us on WhatsApp at +91 7007466933 or use our contact page, and we will reply with next steps and a quote.

Need a WordPress developer?

Custom, fast, secure WordPress websites with editable content and solid SEO. Tell us about your project and get a free estimate within 24 hours.

Free estimate within 24 hours · No spam, ever

WhatsApp us Book a free 30-min call

Leave a Comment

Chat with us