Key takeaways
- Change every password first (WordPress, hosting, SFTP and database), then again once the site is clean.
- Restore a clean backup or replace core, plugin and theme files with fresh copies. Deleting the one bad file you can see rarely ends it.
- Once the whole site is clean, request a review in Search Console. Google says it can take a few days to a few weeks.
Step 1: Write down what you see before you touch anything
Note what made you think the site was hacked, when you noticed it (with the time zone), and what changed recently: a new plugin, a theme edit, a new user. WordPress.org calls these signs indicators of compromise, and this note becomes your incident record.
Check the site from a phone on mobile data and in a private window. Many hacks only redirect visitors who arrive from Google or on a phone, so a logged-in desktop visit can look perfectly normal.
Search Google for site:yourdomain.ca and look for pages you never wrote, often in Japanese or selling pills or replica goods.
Step 2: Call your host and take a snapshot of the infected site
Tell your host what you found. On shared hosting the attack may have touched other sites on the account, and the host may already be blocking something or can confirm whether it is a hack or an outage.
Then download a full copy of the files and the database as they are now, infected or not. If the clean-up goes wrong, you still have something to compare against and to show a professional.
Step 3: Lock every door: passwords, users and keys
Change the passwords for WordPress administrators, the hosting account, SFTP or FTP, and the database user (then update the database password in wp-config.php). Use long, unique passwords from a password manager.
Go to Users in WordPress and delete any administrator you don't recognize. Then replace the secret keys and salts in wp-config.php with a fresh set from the WordPress key generator. That logs out everyone, including an attacker holding a stolen session.
In Search Console, open Settings > Users and permissions and remove any owner or user you didn't add.
With WP-CLI, wp user list --role=administrator lists every admin and wp config shuffle-salts replaces the keys in one go.
Step 4: Scan the site, and your own computer
Use one scanner that looks from outside and one that runs inside WordPress. Sucuri SiteCheck and VirusTotal check the public site for free; the Wordfence and Sucuri plugins scan the files on the server.
If you have WP-CLI, wp core verify-checksums and wp plugin verify-checksums --all compare your files with the official copies on WordPress.org and list every file that was changed or added.
Run a full malware scan on the computers you use to log in. Stolen FTP or admin passwords often come from an infected laptop, and cleaning the site won't help if the password leaks again.
Step 5: Restore a clean backup, or replace the files
If you have a backup from before the infection, restore it, then go straight to the next step: the hole the attacker used is still open in that backup.
With no clean backup, replace files rather than edit them. Download the same WordPress version you run, and upload fresh wp-admin and wp-includes folders over SFTP (not the reinstall button in the dashboard, which only overwrites files and leaves new ones in place). Reinstall each plugin and theme from its original source.
Then inspect what you can't replace: .htaccess files, wp-config.php, index.php, your theme's header.php, footer.php and functions.php, and any PHP file inside wp-content/uploads, where it should never be.
Search the database too. Spam links and redirect scripts are often stored in posts, widgets or the wp_options table.
Step 6: Update everything, remove what you don't use, change passwords again
Update WordPress core, every plugin and every theme to the latest version. Delete plugins and themes you have deactivated: inactive code on the server can still be attacked.
Now change all the passwords a second time. WordPress.org's own advice is to change them once you are sure the site is clean, because the first change happened while the attacker may still have had a way in.
Step 7: Ask Google and Bing to remove the warning
In Search Console, open Security & Manual Actions > Security issues. Fix every issue on every page listed, then select Request Review and explain the problem, what you did and the result.
Google says a review for malware, hacked content or phishing can take from a few days to a few weeks. Don't send another request while one is pending; that can slow later reviews. If Bing also flags the site, use Bing Webmaster Tools.
Step 8: Decide whether you must report a breach
If the site held customer data (form entries, accounts, orders), work out whether personal information was exposed. Under PIPEDA, a breach that creates a real risk of significant harm must be reported to the Privacy Commissioner of Canada and to the people affected, and every breach must be recorded for two years. In Quebec, Law 25 requires notice to the Commission d'accès à l'information when there is a risk of serious injury.
You can also report the incident to the Canadian Centre for Cyber Security. The section below covers both laws in more detail.
If it goes wrong
You can't log in to WordPress
Attackers often change the admin password or email. Open the database in phpMyAdmin or Adminer from your hosting panel, find your user in the wp_users table, set your own email address, then use Lost your password? on the login screen.
The hack comes back a few days later
Something was left behind: a backdoor file, a rogue admin, a scheduled task, or the vulnerable plugin is still installed. Also check other sites in the same hosting account. One infected site can reinfect its neighbours, so clean them all or move yours to its own account.
The Google warning is still there after you cleaned up
A review can take weeks, and Google only clears the warning once it confirms the fix. If the review fails, Search Console shows what it still found. Fix that, then request one new review.
Your emails started bouncing or landing in spam
Hacked sites are often used to send spam, which gets the server's IP address blocklisted, and that can catch email sent from the same server. Ask your host to check the blocklists, and consider moving your email to a hosted service on your own domain.
Signs your WordPress site was hacked
Most hacked WordPress sites are not defaced. The attacker wants your site's reputation with Google, so the damage is often invisible when you look at your own home page. These are the signs that matter:
- Google shows This site may be hacked under your listing, or Chrome shows a red Dangerous site or Deceptive site ahead page.
- A site: search turns up pages you never made, often in Japanese or selling pharmaceuticals, replica goods or gambling.
- Visitors from Google or on phones get sent to another site, while you see nothing wrong when you type the address.
- New administrator accounts, or plugins you didn't install, appear in the dashboard.
- Your host suspends the account or warns you about malware or outgoing spam.
- Customers say their antivirus blocked your site, or your emails suddenly bounce.
Check Search Console first
The Security issues report lists what Google found, with sample URLs, grouped as hacked content, malware and unwanted software, or social engineering. If the site isn't verified there yet, verify it now: you need it to get the warning removed.
How attackers get into WordPress sites
WordPress core itself is rarely the problem. The plugins around it are. In 2025, Patchstack logged 11,334 new vulnerabilities in the WordPress ecosystem, and core had only six, all rated low priority.
of new WordPress vulnerabilities found in 2025 were in plugins; the other 9% were in themes
Source: PatchstackSpeed matters too. The same report found that 46% of vulnerabilities had no fix from the developer by the time they were made public, and that heavily exploited flaws were first attacked a median of five hours after disclosure. A plugin you haven't updated in months, or one the developer has abandoned, is the usual way in.
The other common routes are stolen passwords (often from malware on the owner's own computer), reused passwords leaked from another service, and a neighbouring site on the same shared hosting account.
Clean it yourself or get help
You can clean a simple infection yourself if you are comfortable with SFTP, a database tool and reading PHP. The hard part is not deleting the visible spam. It is finding the backdoor that lets the attacker return.
| Do it yourself | Hire a specialist | |
|---|---|---|
| Best when | You have a clean backup, or the site is small with few plugins | There is no backup, it is a store or holds customer data, or it was reinfected |
| Cost | Your time, plus free scanners | A one-off clean-up fee, sometimes with a monitoring plan |
| Main risk | Missing a backdoor, so the hack returns | Paying for a clean-up that doesn't fix the cause |
| Ask for | Not applicable | What they removed, how the attacker got in, and what they changed to stop it |
Rebuilding can be the faster fix
If the site is old, runs a theme that is no longer updated, or has been hacked more than once, cleaning it again may cost more than rebuilding it on current software. Weigh that before you pay for a second clean-up. See what a website redesign involves.
Want someone to check the clean-up and close the hole? Ask for a free WordPress health check.
Book a callWhat Canadian privacy law asks of you after a hack
A hacked brochure site with no forms is a security problem. A hacked site that stored contact form entries, customer accounts or orders may also be a privacy breach, and Canadian law has rules for that.
- PIPEDA (most private businesses outside Quebec)
Report a breach that creates a real risk of significant harm to the Office of the Privacy Commissioner of Canada, and notify the people affected as soon as feasible. Weigh how sensitive the information is and how likely it is to be misused.
- Keep a record of every breach
PIPEDA requires a record of every breach of security safeguards for two years, even ones that don't meet the reporting threshold. Knowingly failing to report or keep records is an offence that can lead to fines.
- Quebec's Law 25
A business covered by Quebec's private sector privacy act must notify the Commission d'accès à l'information and the people concerned when a confidentiality incident presents a risk of serious injury, and keep a register of incidents.
- The Canadian Centre for Cyber Security
Reporting to the Cyber Centre is voluntary for most businesses, but it helps track attacks across Canada, and it can point you to the right help. If money was stolen or you face extortion, call your local police too.
This is not legal advice
Whether a particular hack is a reportable breach depends on what data was exposed. If customer information was involved, talk to a lawyer or your privacy officer before you decide.
Stop it happening again
- Turn on automatic updates for plugins and themes. WordPress has offered them since version 5.5, plugin by plugin from the Automatic updates column on the Plugins screen, and it checks twice a day.
- Delete plugins and themes you don't use, and replace any that haven't been updated in a year.
- Use two-factor authentication on every administrator account and on your hosting account.
- Give people the lowest role that does the job. An editor doesn't need to be an administrator.
- Keep automatic backups off the server (cloud storage, not just your host), and test a restore once.
- Leave the site verified in Search Console so you hear about the next problem from Google, not a customer.
If the hack knocked your pages out of search, give it time after the review clears, then check why a website stops showing on Google for anything left over. For ongoing care, WordPress site refresh and maintenance covers updates, backups and monitoring.
WordPress site hacked questions
How do I know if my WordPress site is hacked?
Look for a hacked or dangerous site warning in Google or Chrome, pages you didn't write in a site: search, redirects that only happen on phones or from Google, and administrator accounts you don't recognize. Search Console's Security issues report confirms what Google found.
Can I just restore a backup?
Yes, if the backup is from before the infection. But the backup has the same weakness the attacker used, so update everything and change every password straight after restoring, or the site will likely be hacked again.
How long does it take Google to remove the hacked warning?
Google says a review can take from a few days to a few weeks. Request it only once the whole site is clean, and don't resubmit while one is pending.
Will a hack hurt my Google rankings?
It can. Spam pages, warnings and redirects all hurt how Google and visitors treat the site. Rankings usually recover once the site is clean and the warning is gone, but spam URLs can linger in results for a while.
Do I have to tell my customers?
If personal information was exposed and the breach creates a real risk of significant harm, PIPEDA requires you to notify the people affected and the Privacy Commissioner. In Quebec, Law 25 sets a similar duty for a risk of serious injury. If no personal data was involved, there is usually no duty to notify.
Sources
- FAQ My site was hacked WordPress.org
- Plugin and themes auto-updates WordPress.org
- wp core verify-checksums WordPress.org
- Security Issues report Google Search Console Help
- This site may be hacked Google Search Help
- How do I know if my site was hacked? web.dev
- State of WordPress Security in 2026 Patchstack
- What you need to know about mandatory reporting of breaches of security safeguards Office of the Privacy Commissioner of Canada
- Regulation respecting confidentiality incidents LégisQuébec
- Report a cyber incident Canadian Centre for Cyber Security