How To Recover A Hacked WordPress Website

TL;DR: Recover your hacked WordPress website, you should protect visitors, create a quarantine backup and secure your login credentials. Next, remove malware or restore a verified clean backup, fix the security vulnerability and test your website before making it publicly accessible again.

Overview

WordPress Hosting allows you to access the hosting tools required to recover a compromised website.

Unexpected redirects, unknown Administrator accounts, malicious content and browser security warnings may indicate that your website has been hacked. However, website errors or downtime don’t necessarily indicate a security breach.

This guide explains how to identify a possible compromise, secure your website and restore normal operation.

Before You Begin

Ensure you have access to your Domains.co.za Customer Portal, cPanel, WordPress Dashboard (if available) and Google Search Console (if configured).

You should also have a secure location for backups and an approximate date when the suspicious activity began.

Step 1: Check for Signs of a Compromised WordPress Website

Check your website for the following warning signs:

  • Unknown Administrator accounts.
  • Unexpected redirects to unfamiliar websites.
  • Spam pages, links or unauthorised content.
  • Browser or Google security warnings.
  • Hosting malware alerts.
  • Website files modified without your knowledge.

If you can access WordPress, navigate to Users → All Users to review Administrator accounts.

A broken website or HTTP error alone does not confirm that WordPress has been hacked.

Step 2: Protect Visitors While Investigating

If your website displays phishing content, redirects visitors to harmful websites or distributes malware, temporarily restrict public access.

Use hosting-level access restrictions or contact Domains.co.za Support for assistance.

Avoid installing additional maintenance-mode plugins on a potentially compromised WordPress installation.

Step 3: Create a Quarantine Backup

Before removing suspicious files, preserve a copy of your website and database.

Back Up Your Website Files

1. Login to the Domains.co.za Customer Portal.

2. Open the Manage Services dropdown menu.

How To Recover A Hacked WordPress Website

3. Select Web Hosting or WordPress Hosting.

How To Recover A Hacked WordPress Website

4. Click Manage next to the relevant domain.

How To Recover A Hacked WordPress Website

5. Click Login next to Control Panel to access cPanel.

6. Open File Manager under Files.

7. Locate your WordPress installation directory.

8. Select and compress the website files.

9. Download the archive to a secure location.

    Export Your WordPress Database

    1. Return to cPanel and open phpMyAdmin under Databases.

    2. Select your WordPress database.

    3. Click Export.

    4. Select Quick and SQL.

    5. Click Export to download the database.

      Label both copies as a Quarantine Backup, including the date.

      Step 4: Check Google Search Console

      Google Search Console can identify hacked content, malware and deceptive pages.

      1. Login to Google Search Console.

      2. Select your website property.

      3. Navigate to Security & Manual Actions → Security Issues.

      4. Review reported problems and affected URLs.

      5. Check for unfamiliar Search Console users.

        You can also search Google using site:yourdomain.co.za to identify unexpected, indexed pages.

        Google may only display examples of affected URLs, so additional compromised pages could exist.

        Step 5: Review WordPress Administrator Accounts

        Attackers may create unauthorised Administrator accounts to maintain website access.

        1. Login to your WordPress Dashboard.

        2. Navigate to Users → All Users.

        3. Review accounts with the Administrator role.

        4. Identify unfamiliar usernames or email addresses.

        5. Remove or disable accounts confirmed as unauthorised.

        6. Verify legitimate users’ roles and email addresses.

          Removing suspicious accounts does not guarantee that the website is free from malware.

          Step 6: Secure Your Login Credentials

          Change passwords that may have been compromised, including:

          • WordPress Administrator and other privileged accounts.
          • Domains.co.za Customer Portal, if exposure is suspected.
          • FTP/SFTP accounts.
          • Database credentials, where necessary.
          • Recovery email accounts, if compromised.

          Enable two-factor authentication (2FA) wherever supported.

          Step 7: Scan & Remove WordPress Malware

          Once you have secured access and preserved a quarantine backup, investigate and remove malicious files, injected code, unauthorised database changes and hidden backdoors.

          Avoid deleting unfamiliar files or database entries without confirming their purpose.

          Step 8: Decide Whether to Clean or Restore Your Website

          Restoring a verified backup created before the compromise may help recover your website.

          Restore From a Backup WhenClean or Rebuild When
          A trusted, pre-compromise backup exists.No known clean backup exists.
          The compromise date is reasonably clear.The compromise date is unknown.
          Important newer data will not be lost.Recent orders or customer data must be preserved.
          The original vulnerability can be fixed.The entry point remains unclear.

          Never assume a WordPress backup is clean, simply because it restores successfully.

          Step 9: Replace or Update Compromised Components

          After malware removal, review your WordPress installation for outdated or compromised components.

          1. Check WordPress Core for available updates.

          2. Replace compromised plugins and themes with trusted copies.

          3. Remove unused plugins and themes.

          4. Review custom code for unauthorised changes.

          5. Install necessary security updates.

            Download replacement files only from WordPress.org or legitimate developers.

            Step 10: Reset Passwords & Security Keys Again

            Once the website is clean:

            1. Change privileged passwords again.

            2. Reset WordPress security keys and salts.

            3. Confirm that unauthorised users no longer have access.

            4. Review hosting and FTP/SFTP credentials.

              Resetting security keys and salts invalidates existing WordPress login sessions.

              Step 11: Identify & Fix the Security Vulnerability

              Removing malware does not necessarily prevent reinfection.

              Investigate potential entry points, including:

              • Outdated WordPress software, plugins or themes.
              • Untrusted or nulled plugins and themes.
              • Weak or reused passwords.
              • Unknown Administrator accounts.
              • Excessive user or file permissions.
              • Suspicious login activity.

              Correct confirmed vulnerabilities before reopening the website.

              If the cause cannot be identified, consider obtaining specialist assistance.

              Step 12: Test Your Website Before Reopening

              Before restoring public access, check that:

              • Your homepage, navigation and important pages work correctly.
              • Contact forms and checkout functions operate normally.
              • HTTPS connections work correctly.
              • Unexpected redirects and unauthorised pages are gone.
              • Administrator accounts are legitimate.
              • Your sitemap and robots.txt contain no suspicious changes.
              • Malware scans and Search Console show no unresolved threats.

              Create a fresh backup after completing recovery.

              Step 13: Request a Google Security Review

              If Google flagged your website as unsafe:

              1. Open Google Search Console.
              2. Navigate to Security & Manual Actions → Security Issues.
              3. Confirm that all reported problems have been resolved.
              4. Test affected URLs.
              5. Click Request Review, where available.
              6. Explain what was cleaned and which vulnerabilities were corrected.

              Google reviews may take several days or longer. Manual actions follow a separate reconsideration process.

              Troubleshooting

              What If I Cannot Login to WordPress?

              Try the WordPress password recovery option and check whether your Administrator email address has changed. If access remains unavailable, use your hosting management tools where appropriate or contact Domains.co.za Support.

              Why Does WordPress Malware Keep Returning?

              Recurring malware usually indicates that a vulnerability, compromised credential or hidden backdoor remains. Review your software, user accounts and malware-removal process before restoring another backup.

              What If Google Still Shows a Security Warning?

              Check Search Console → Security Issues for unresolved problems. Confirm that the website is clean and that a review has been requested where necessary.

              What If I Don’t Know Which Backup Is Clean?

              Avoid restoring an unverified backup. Investigate the existing installation or obtain specialist assistance before proceeding.

              Additional Information

              • Preserve a quarantine backup before making destructive changes to your website.
              • Restore only from backups reasonably believed to predate the compromise.
              • Download WordPress software, themes and plugins from trusted sources.
              • Security plugins can detect threats, but one scan cannot guarantee complete malware removal.
              • An SSL Certificate encrypts data in transit but does not remove WordPress malware.
              • Repeated reinfection may indicate an unresolved vulnerability or hidden backdoor.
              • Seek appropriate security or legal guidance if sensitive customer information may have been exposed.
              • Create a new clean backup after recovery and continue monitoring suspicious activity.

              FAQS

              What Should I Do First If My WordPress Website Is Hacked?

              Check for signs of compromise, protect visitors and create a quarantine backup before changing website files. Then secure your accounts and investigate the malware.

              Should I Restore a Hacked WordPress Website from a Backup?

              Yes, provided the backup is reasonably believed to predate the compromise. You must also correct the original vulnerability to reduce the risk of reinfection.

              Should I Change Passwords Before or After Removing Malware?

              Change potentially compromised passwords during the initial recovery process and again after cleaning the website. This helps protect against credentials captured by malware.

              How Do I Know Whether My WordPress Website Is Clean?

              Confirm that identified malware and unauthorised accounts have been removed, vulnerabilities are corrected and the website functions correctly. Run another malware scan and review Search Console warnings.

              What Should I Do If My WordPress Website Keeps Getting Hacked?

              Investigate the original entry point, review credentials and permissions, and replace compromised software. Seek specialist assistance if the issue continues.

              [post-views]