WordPress · Security · Websites
My WordPress Site Was Hacked: What to Do in the First Hour
If your WordPress site is hacked, contain the damage first, then clean it up properly. Put it into maintenance mode, change every password from a clean device, remove unknown admin users and tell your host. Then find how the attackers got in, ask Google to remove the warning and add protection.
By Sajjad Liaqat · · Updated · 4 min read

You open your website and something is wrong. Visitors are redirected to a strange site. Google shows "This site may be hacked" under your listing. Your homepage has text you never wrote, or your host has suspended the account.
It's a horrible feeling, but you're not alone, and it's fixable. What you do in the first hour makes the clean-up faster and stops the damage from spreading.
Signs your WordPress site has been hacked
- Visitors, especially on mobile, are redirected to spam, gambling or "you've won" pages
- Google shows a warning in search results, or Chrome shows a red "dangerous site" screen
- New admin users you didn't create
- Pages or posts you didn't publish, often in other languages
- Your hosting company emails you about malware or suspends the site
- Emails from your domain bounce or land in spam suddenly
The first hour: step by step
1. Don't panic, and don't delete things yet
It's tempting to start removing plugins or files. Wait. You might delete the evidence of how the attacker got in, or break the site further. The goal of the first hour is to contain the problem, not fix it.
2. Put the site into maintenance mode, or ask your host to
If visitors are being sent to harmful pages, stop that first. Many hosts can temporarily take the site offline or show a maintenance page. This protects your customers and your reputation while you work.
3. Change every password, from a clean device
Use a computer you trust (not one that may itself have a virus) and change:
- WordPress admin passwords, for every admin user
- Hosting account password
- FTP/SFTP and database passwords
- Email accounts on the same domain
Turn on two-factor authentication wherever you can.
4. Remove admin users you don't recognise
In Users, look for administrator accounts you didn't create. Note their names and emails first (useful for the clean-up), then remove them.
5. Tell your host
Your hosting company has seen this many times. Ask them:
- Whether they detected malware and which files are affected
- Whether they have a clean backup from before the problem started
- Whether other sites on your account are affected
6. Find your last clean backup
A recent, clean backup is the fastest way back. But be careful: restoring a backup brings the site back with the same weak spot that let the attacker in. A restore must be followed by fixing the cause (step 8).
Cleaning up properly
A quick clean that misses one hidden file usually means the hack comes back a week later. A proper clean-up includes:
- Scanning every file, not only WordPress itself but themes, plugins and the uploads folder
- Replacing WordPress core, themes and plugins with fresh copies from trusted sources
- Checking the database for injected scripts and hidden admin users
- Removing "backdoors": small hidden files attackers leave so they can get back in
- Checking scheduled tasks that can re-infect the site
Find out how they got in
Most WordPress hacks come through a few common doors:
- An outdated plugin or theme with a known security hole
- Nulled (pirated) themes or plugins, which often come with malware already inside
- Weak or reused passwords, especially without two-factor login
- Old, forgotten installs: a test site or old copy of WordPress in a subfolder that nobody updates
If you only clean the site and don't close the door, it will happen again.
Ask Google to remove the warning
Once the site is clean, open Google Search Console → Security issues, confirm the problems are fixed and request a review. Google checks the site and removes the warning, usually within a few days.
How to stop it happening again
- Update WordPress, themes and plugins regularly, ideally every week
- Remove plugins and themes you don't use
- Never install nulled or "free premium" plugins
- Use strong, unique passwords and two-factor login
- Keep daily off-site backups you've actually tested restoring
- Use a security plugin or firewall, and good hosting with malware scanning
Need help right now?
If your site has been hacked and you'd rather hand it to someone who does this calmly and properly, contact us. We'll clean it, find and close the way in, and get your site and your Google listing back to normal.
Want to check your site before anything goes wrong? Request a free website audit. If you're wondering whether WordPress is still the right choice for your business, read WordPress vs a custom-built website.


