My WordPress Site Got Hacked: What to Do First (Step by Step)

If your WordPress site is redirecting visitors, showing spam, or has triggered a Google warning, it’s understandable to feel alarmed. Take a breath: you don’t need to diagnose everything yourself right now. The priority is to protect your accounts, preserve information about what happened, and get help with a safe cleanup.
Follow these steps in order. Avoid deleting files or making random changes before you have a backup or guidance from your hosting provider.
1. Stay calm and record what you see
Don’t panic-delete suspicious pages, plugins, or files. Removing visible spam may not remove the cause of the hack, and rushed changes can make it harder to understand what happened.
From a clean device, note what you observed and when: for example, a redirect, an unfamiliar login page, a browser warning, or a message from your host. Save screenshots and copy any suspicious page addresses. If the site appears to be harming visitors, ask your host how to temporarily restrict access while you investigate.
Signs your WordPress site may be hacked
- Visitors are redirected to an unfamiliar site, or you see spam you didn’t publish.
- Search results show strange pages or titles associated with your domain.
- You find unfamiliar administrator accounts or unexpected password-reset emails.
- Your host reports malware or suspicious activity.
- Google or a browser displays a security warning.
- Your site’s files, settings, or login page have changed without your involvement.
A single symptom does not tell you exactly what happened. Keep a record and investigate before drawing conclusions.
2. Secure your accounts from a clean device
Use a device you believe is safe, not a computer that may itself be infected. Change passwords for the accounts that could provide access to your website:
- WordPress administrator accounts
- Hosting account
- Email accounts used for password resets
- Domain registrar and DNS
- FTP, SFTP, or other site-management accounts
- Backup, CDN, and related services
Use a different, strong password for each account, and turn on two-factor authentication (2FA) wherever it’s available. WordPress provides password best-practice guidance.
Changing passwords is important, but it does not clean the website. Ask your host or technician to invalidate existing WordPress sessions as part of the response. Otherwise, someone who already has an active session may still have access.

3. Contact your hosting provider
Tell your hosting provider that you suspect your WordPress site has been hacked. Ask them to help you understand the situation and preserve relevant information. Useful questions include:
- Can you see signs of malware or unauthorized access?
- Is there a backup from before the incident?
- Can you preserve relevant access or error logs?
- Could other sites or accounts on my hosting plan be affected?
- What steps do you recommend to contain the issue?
Your host may be able to identify suspicious activity or help isolate the account. For broader guidance, see WordPress’s “My site was hacked” documentation.
4. Take a backup or snapshot before cleanup
Before files or database content are changed, ask your host or a qualified technician to create a complete copy of the affected site. This is a preservation copy, not a clean backup to restore immediately. Label it clearly as potentially compromised and store it securely.
Also ask whether a verified backup from before the incident is available. Don’t restore one simply because it is older: it needs to be checked, and restoring a backup without fixing the way the attacker got in can leave the site vulnerable again.

5. Identify the symptoms and scope
Once the site and its evidence are being handled carefully, make a list of what you know. Note affected page addresses, when the problem began, host notifications, Google warnings, unknown accounts, and any recent changes to the site.
Look for patterns such as redirects that appear only on some devices, spam pages that don’t show up in normal navigation, or unfamiliar administrator accounts. A site can behave differently for its owner than for a visitor, so the pages you see may not be the whole picture.
If Google shows a warning, check the verified property in Google Search Console’s Security issues report. Google may provide examples of affected URLs, but those examples may not represent every problem on the site. A browser warning or search result warning can also have a different cause; don’t assume that one visible page is the full extent of the issue.
6. Decide whether DIY cleanup is safe
A small, well-understood issue may be manageable for someone experienced with WordPress security and site files. But a hack can involve more than visible spam. Cleanup may require finding and removing malicious files, hidden backdoors, unauthorized access, and the security weakness that allowed the attacker in.
DIY cleanup is a bad idea if you:
- Don’t know how to safely inspect website files and databases.
- See unknown administrator accounts, hidden pages, or repeated reinfection.
- Have a Google security warning or your host has taken the site offline.
- Run an online store or handle customer information through the site.
- Don’t have a verified backup or aren’t sure what to remove.
- Have already tried deleting files, but the problem returned.
In these situations, ask your host or a WordPress security professional to assess the incident before making more changes. The Hack Remover helps small businesses investigate hacked websites, remove malicious files and backdoors, address access risks, and harden sites after cleanup. If you’re unsure where to start, you can contact us for an incident assessment.
7. Clean the site and fix the way in
Removing a warning or a suspicious page is not the same as cleaning the site. A proper response should investigate the files, database, WordPress accounts, and relevant access settings; remove malicious changes and hidden backdoors; and address the weakness that may have allowed the intrusion.
The right approach depends on what happened. It may involve restoring from a verified clean backup or carefully cleaning the existing site. Don’t assume that reinstalling WordPress alone will remove malware elsewhere in the site, or that restoring a backup alone will fix an outdated or vulnerable component.
After cleanup, change affected passwords again and confirm that unauthorized access has been removed.
8. Request a Google review after cleanup
If Search Console lists a security issue, fix the issue across the site before asking Google to review it. Test affected pages and check that unwanted redirects, spam, or malicious content are gone. Also make sure the underlying vulnerability has been addressed.
Then open the Security issues report in Search Console and follow its instructions to request a review. Explain what the issue was, what you did to fix it, and how you checked the site afterward. Google’s security issue guidance explains the process. A review does not guarantee a particular outcome or timeline, so keep monitoring the report and your site.
9. Harden the site to reduce the chance of a repeat
Once the site is clean, make security maintenance part of your routine:
- Update WordPress, plugins, and themes, and remove anything unused or no longer maintained.
- Use 2FA for administrator accounts.
- Give each person only the access they need, and remove accounts that are no longer required.
- Keep regular backups of both site files and the database, and make sure you know how to restore them.
- Use unique passwords and keep access to email, hosting, and domain accounts secure.
- Review the site and host notifications for unexpected changes.

A hacked WordPress site is stressful, but you don’t have to solve the entire problem at once. Secure access, involve your host, preserve a snapshot, and get the right help if the cleanup is beyond your experience. After the site is cleaned and hardened, keep monitoring it and maintain reliable backups.