Skip to content
Prodjex

WordPress Site Hacked? What to Do in the First Hour

7 min read

WordPress Site Hacked? What to Do in the First Hour

If your WordPress site has been hacked, the first hour is about containment, not cleanup. Confirm it's really a hack, write down what you're seeing, change every password and kick everyone out, save a copy of the site as it is now, and tell your host. Don't delete files at random, restore an old backup over the top, or ask Google to review the site yet. Those steps come later, once you know how the attacker got in. If the site takes payments, holds customer data, or you're not comfortable working in files and databases, this is the point to bring in help.

Signs your WordPress site was hacked

WordPress's own guide for hacked sites lists clear warning signs, including:

  • Google, Bing or another service flags or blocklists the site
  • Your host has disabled or suspended the site
  • Visitors say their antivirus is blocking it
  • New admin users, posts or pages appear that nobody created
  • You can see the hack when you open the site

Other common symptoms: visitors on phones get redirected to spam or scam pages, Google search results show your site with pharmacy, casino or foreign-language titles, your contact form or server starts sending spam, or your hosting bill or resource usage jumps.

Some hacks only show up for certain visitors (first-time visitors, mobile users, or people arriving from Google) so you may not see anything when you visit while logged in. Check from a phone on cellular data and in a private browser window.

Minute 0 to 10: confirm and write it down

Stay calm and don't start deleting things. The WordPress guide says the first actionable step is documentation, and it's worth doing before anything else. Note:

  • What you're seeing, and screenshots of it
  • When you first noticed, and when it was last working normally
  • What changed recently: a new plugin, a theme update, a new user, a new developer or agency
  • Where the site is hosted, and who has logins to it

This becomes your incident record. It helps whoever cleans the site find the cause faster, and you may need it for your insurer, a payment processor or customers.

Then check Google Search Console, if you have it set up. Its Security Issues report shows whether Google has found hacked content, malware or phishing on your site, with sample affected URLs. Google says to treat this report as "the source of truth" because browser warnings may not appear for you even when they appear for others.

Minute 10 to 25: lock down access

Assume every password connected to the site is known to the attacker. Change them, starting with the most powerful:

  1. Hosting control panel (cPanel, Plesk or your host's dashboard) and your domain registrar
  2. SFTP/FTP and SSH accounts
  3. The database password (update wp-config.php to match)
  4. Every WordPress administrator, then all other users
  5. Email accounts tied to the site, especially the admin email, since password resets go there

Use long, unique passwords from a password manager, and turn on two-factor login wherever it's offered.

Log everyone out. Changing passwords doesn't end sessions that are already logged in. The WordPress guide recommends replacing the secret keys in wp-config.php with a fresh set from the official WordPress key generator, which forces everyone off.

Remove what you don't recognize. Check Users for admin accounts nobody created, and delete or downgrade them. Note their usernames and creation dates first, for your incident record.

Check the computer you log in from. WordPress's guide points out that infections sometimes start on the site owner's own laptop, with malware stealing saved logins. Run a full antivirus scan on any computer used to manage the site before you type the new passwords into it.

Minute 25 to 40: save a copy before you change anything

It feels backwards, but back up the hacked site before you clean it. Download the files and export the database as they are now. That copy:

  • Preserves evidence of how the attacker got in
  • Protects content you'd otherwise lose if a cleanup goes wrong
  • Lets a professional investigate without touching the live site

Then find out what clean backups exist. Ask your host what they keep and how far back. A backup from before the hack started is valuable, but restoring it on its own rarely fixes anything: the hole the attacker used is still there, and they usually come back within days. Restore only after the cause is found and fixed, and re-apply any legitimate changes made since.

Minute 40 to 60: contain and get help

Tell your hosting provider. On shared hosting, the hack may affect other sites on the same server, and your host may have logs, malware scans or clean backups you can't see. They may also be the ones who suspended the site.

Consider a maintenance page. If the site is redirecting visitors to scams or serving malware, taking it offline (or showing a simple maintenance page) protects your customers and your reputation while it's cleaned.

Run a scan, but don't rely on it. WordPress's guide suggests both a security plugin that scans from inside the site and an external scanner such as Sucuri SiteCheck or VirusTotal. Scans are good at finding known malware and bad at proving a site is clean. Modern malware is built to hide: Patchstack's 2026 security report describes attackers "getting more strategic and sophisticated" and malware that is "harder to find, and even harder to remove."

Decide who cleans it. You can follow a cleanup guide yourself if the site is simple and you're comfortable with files, databases and server logs. Bring in a professional if:

  • The site takes payments or stores customer information
  • Your host has suspended it, or Google is showing a warning
  • It's been reinfected after an earlier cleanup
  • You can't tell how the attacker got in

What not to do

  • Don't delete files at random. You may break the site and destroy the evidence of how it was hacked.
  • Don't just restore a backup and move on. Without fixing the cause, you'll likely be hacked again.
  • Don't request a Google review yet. Google says to fix the issue across the whole site first, and warns that requesting a review before it's fixed can slow the next one down or get you marked as a repeat offender.
  • Don't keep logging in from a computer you haven't scanned.
  • Don't pay anyone who contacts you claiming they can remove a hack you never told them about.

After the first hour: cleanup and recovery

A proper cleanup goes well beyond deleting the obvious bad files:

  1. Find how they got in. Usually an outdated or vulnerable plugin or theme, a stolen password, or a nulled (pirated) premium plugin. Patchstack found that 91% of new WordPress vulnerabilities in 2025 were in plugins, 9% in themes, and only six, all low priority, in WordPress core.
  2. Replace WordPress core, plugins and themes with fresh copies from trusted sources, rather than trying to clean infected ones.
  3. Search the database and uploads for injected scripts, spam links, hidden admin users and backdoor files that survive a plugin reinstall.
  4. Patch the hole: update or remove the vulnerable component, and remove anything you don't use.
  5. Request a review from Google in the Security Issues report, describing what was wrong and what you fixed. Google says reviews can take several days or weeks.
  6. Check email deliverability. If the site was used to send spam, your server's IP address or domain may be on email blocklists, which can stop your normal business email from reaching customers.
  7. Think about notification. If customer data may have been exposed, talk to your attorney about what you're required to tell customers.

How to keep it from happening again

Most WordPress hacks come from software that wasn't updated in time, and the window keeps shrinking. Patchstack reports that for the most heavily exploited vulnerabilities, the median time to mass exploitation was five hours, and 46% of vulnerabilities had no fix from the developer by the time they were made public. Updating "when we get around to it" isn't enough.

  • Update WordPress, plugins and themes promptly, and test after updates. Our guide to safely handling WordPress updates covers how.
  • Remove plugins and themes you don't use, and never install nulled premium plugins.
  • Use a firewall that can block known attacks before a patch is available.
  • Use two-factor login and give each person their own account with only the access they need.
  • Keep automatic, off-site backups, and test that they restore.
  • Monitor for file changes and malware, so you hear about a problem before your customers do.

Our complete guide to securing your WordPress site goes deeper on each of these, and what website maintenance costs explains what a proper maintenance plan includes. If your site runs on an old version of PHP or WordPress, see our PHP and WordPress upgrade services; outdated versions make every other problem harder to fix.

Hacked WordPress site help from Prodjex

Prodjex is a Kansas City area web development company that has delivered more than 617 projects since 2017, and we've spent years cleaning up and hardening hacked and neglected sites. Our cybersecurity and malware services cover finding how an attacker got in, removing the infection, closing the hole, and dealing with Google warnings.

To keep it from happening again, our care plans include managed hosting, security and malware monitoring, updates and daily backups, with critical vulnerabilities patched or mitigated within 24 hours.

Contact us about a hacked site. Tell us what you're seeing and where the site is hosted, and we'll tell you what we'd do first.

  • wordpress security
  • hacked website
  • malware removal
  • incident response
  • small business

Keep reading