Finding out your WordPress website has been hacked is stressful. Your pages might be redirecting to strange sites, Google might be showing a warning next to your listing, or you might be locked out of your own login. The good news is a hacked site can be recovered, and the order you do things in next matters.
This guide walks through the stages we work through when we recover a compromised site: identify the compromise, contain it, clean the site, check users, plugins and files, restore safely, and stop it happening again. If you would rather hand it to a team, our WordPress hacking recovery service covers all of it.

Signs Your WordPress Website Has Been Hacked
Some hacks are obvious. Others are built to stay hidden from you. Look for any of these:
Visitors are redirected to other websites.
Spam, unfamiliar pages or content you did not add appear on your site.
There are administrator accounts you do not recognise.
You cannot log in to WordPress, even with the right password.
Google shows a warning such as “This site may be hacked”, or Chrome shows a warning screen.
Your hosting provider has suspended the site or emailed you about malware.
Your search traffic or rankings drop suddenly.
A security plugin flags files you do not recognise.
Emails from your site land in spam folders. Compromised servers can end up on blocklists.
Some hacks only show to visitors who arrive from Google search, so opening your site directly can look fine. Search for your business in Google and click through from the results. You can also run a search like site:yourdomain.com.au with a word you would not expect to see on your site, such as a pharmacy product name. Then check the Manual Actions and Security Issues reports in Google Search Console.
Step 1Contain the Problem
Before you change anything, spend a few minutes limiting the damage and protecting the evidence.
Write down what you see. Note the symptoms, when they started and any recent changes to plugins, themes or users. The WordPress.org hacked site guide recommends this.
Scan your own computer. Attackers can steal logins with malware on a local machine. If your computer is infected, new passwords will not stay safe for long.
Call your hosting provider. Ask whether they have seen the attack, whether other sites on the same server are affected and what backups they hold.
Keep a copy of the infected site. Take a full copy of the files and database before you clean anything. It helps you work out how the attacker got in. Never restore from it.
Take the site offline or show a maintenance page. Google advises shutting a hacked site down while you find, fix and clean the compromised pages, and only bringing it back once it is secure.
Step 2Find the Infection and Clean the Site
Attackers usually leave backdoors, which are small pieces of hidden code that let them back in. They turn up in places like the .htaccess file, theme files such as header.php, footer.php and functions.php, plugin and theme folders and the database. If you clean up by hand and miss one, the hack returns, even after you change your passwords.
Run a malware scan with a tool such as Wordfence or Sucuri. Treat the results as leads, not a guarantee. Scanners miss things.
For WordPress core, replace the wp-admin and wp-includes folders with fresh copies of the same WordPress version the site already runs. WordPress.org recommends copying them over by SFTP instead of using the reinstall button in the dashboard, because that option usually overwrites existing files while hacks often add new ones. The wp-content folder holds your themes, plugins and uploads, and needs checking file by file.
If you have a clean backup from before the infection, restoring it is often more reliable than cleaning by hand. Step 4 covers how to do that safely.
Step 3Check Users, Plugins, Themes and Files
Whether you clean or restore, go through these four areas before the site goes back online.
Users: open Users in the WordPress dashboard and delete or demote any administrator you do not recognise. Then force a password reset for every user, starting with the administrators.
Plugins: delete any plugin you are not using, because deactivated plugins still sit on your server as code. Check that each remaining plugin is still in the WordPress.org directory, has been updated recently and has not been closed. Replace abandoned ones. Download fresh copies from the official source and do not trust the files already on the server.
Themes: the same rules apply. Keep one active theme, a child theme if you use one, and delete the rest. Avoid pirated or “nulled” premium themes and plugins, which can arrive with malicious code already inside.
Files: look at the .htaccess file in the root folder and any subfolders, which is the file most commonly changed in an infection. Check index.php, header.php, footer.php, functions.php and wp-config.php for code you did not write. The uploads folder should hold images and documents, so any PHP file in there deserves a hard look.
We use version control and code tracking on all of our WordPress websites, which makes it much easier to see which files have changed. If your site does not have it, compare your files against clean copies of the same plugin and theme versions.
Step 4Restore the Site Safely
Restoring a clean backup is usually the most reliable way to remove hidden malware, as long as you follow this order before the site goes live:
Wipe the infected files and database so no dormant malware sits alongside the restored files.
Restore a backup taken before the infection started.
Close the way in. Update WordPress core, every plugin and every theme straight away, and check the user list again.
Reset every password (WordPress, hosting control panel, SFTP and database) from a clean computer. Then replace the secret keys in wp-config.php using the WordPress secret key generator, which logs out anyone still signed in.
Test the site, including logins, forms and checkout, before it goes back online.
A backup will not fix everything. It fails in three common situations:
The backup is already infected. Hackers can sit on a site for a while before spam or redirects appear, so the backup may carry the infection with it.
The weak point has no fix. If the entry point was an abandoned plugin, or a new flaw with no patch, updating will not close it. Remove the plugin or replace it with a maintained one.
There is no clean backup. Cleaning is slower and riskier, and this is where professional help pays off.
Once the site is confirmed clean, change your passwords one more time.
Step 5Clear Google Warnings
If Google flagged your site, open the Security Issues report in Search Console. Fix every issue it lists, across the whole site, because fixing only some pages does not bring the site back. Then select Request Review and explain the exact issue, the steps you took and the result.
Reviews can take from a few days to a few weeks. Google says hacked spam reviews can take longer than malware reviews. Do not resubmit while a request is pending, and do not request a review until the problem is fixed, because that can lengthen the wait.
Step 6Stop It Happening Again
Most WordPress hacks come through plugins. Patchstack’s State of WordPress Security report counted 11,334 new vulnerabilities in a single year. Of those, 91% were in plugins, 9% were in themes and only 6 were in WordPress core. It also found that 46% had no fix available when they were publicly disclosed. These habits close most of the gaps:
Keep everything updated. We usually recommend monthly patching for WordPress core, themes and plugins, and sooner when an update fixes a security issue. Test updates on a staging copy first where you can.
Use fewer plugins. Install as few third-party plugins as you can, and only from reputable developers. Delete anything you do not use.
Protect logins. Use long, unique passwords from a password manager, avoid “admin” as a username and turn on two-factor authentication for administrators.
Back up regularly. Keep daily or weekly copies of your files and database, stored away from the server they came from. Our hosting packages include free 7 day rolling backups, and our WordPress care plans include daily cloud backups.
Add a firewall. A security plugin or a web application firewall service blocks many common attacks before they reach your site.
Tighten file settings. WordPress hardening guidance suggests permissions of 755 for folders and 644 for files, with wp-config.php readable only by you and the web server. It also suggests adding the DISALLOW_FILE_EDIT setting to switch off the built-in code editor. Ask your developer or host to set these, because permissions that are too tight can stop uploads working.
Choose your host carefully. Ask what security steps they take on shared servers, and make sure SFTP is available.
Watch for changes. Logging and file monitoring help you spot a problem early, before Google or a customer does.
Do You Need to Report the Breach?
If the hack exposed personal information, such as customer names, emails or addresses, you may have to notify the Office of the Australian Information Commissioner (OAIC) and the people affected. This applies to organisations covered by the Privacy Act, including businesses with an annual turnover of more than $3 million and private sector health service providers, when the breach is likely to result in serious harm. If you are unsure, you must take reasonable steps to complete an assessment within 30 calendar days. The OAIC quick reference guide explains the steps. This is general information, not legal advice.
When to Call in Help
Cleaning a hacked WordPress site takes more than deleting a few suspicious files. If you are not comfortable working in your site files, or you cannot find how the attacker got in, it is worth handing it over before the problem gets worse.
Our WordPress hacking recovery service starts with an investigation into how your site was compromised. We then remove malware, malicious code and backdoors, update WordPress core, plugins and themes, secure user accounts, strengthen your security and test everything. Where we can, we also help you request a Google security review. Most recovery projects can be completed within one business day, and larger or more complex sites can take longer.
Book a free strategy session with Pivotal Agency to get your website cleaned, secured and back to performing safely.