On this page
If your WordPress site is hacked, act in this order: take the site offline or into maintenance mode, change every password, restore a clean backup if you have one, or scan and remove the malicious files, then update WordPress, themes and plugins. Afterwards, find how the attacker got in so it cannot happen again.
If you searched “WordPress site hacked what to do” a few minutes ago, start with the first-steps list below and come back to the rest once the site is contained.
How do you know your site is hacked?
A hacked WordPress site usually shows itself through redirects, warnings, strange content or accounts you did not create. Some hacks are silent, so a clean-looking homepage does not prove the site is fine.
| What you see | What it usually means |
|---|---|
| Visitors are sent to another site, often only on phones or only from Google | Redirect code has been added to files or the database |
| Browser or Google shows a red “deceptive site” or malware warning | Google has detected harmful content and flagged the site |
| Search results show pages or words you never wrote, such as pharmacy or gambling terms | Spam pages or hidden links have been injected |
| New admin users you do not recognize | The attacker created a way back in |
| You cannot log in, or your password stopped working | Your account was changed or removed |
| Your host suspended the account or emailed about malware | The host’s scanner found infected files |
| The site is suddenly slow or sending large amounts of email | The server is being used for spam or other attacks |
| Files or plugins you did not install | A backdoor was uploaded |
Slowness alone is not proof of a hack. If that is your only symptom, see why your website is slow first.
What should you do first?
First contain the damage: take the site out of public view, lock the attacker out and save a copy of the evidence. Do these before you delete anything.
- Write down what you saw and when. Take screenshots of warnings, redirects and unknown users. You will need them later.
- Take the site offline or into maintenance mode. If you cannot log in, ask your host to do it. This protects visitors and limits harm to your reputation.
- Contact your hosting company. Tell them the site is compromised. Many hosts can scan the account, show which files are infected and tell you when it began.
- Change every password. Hosting account, WordPress admins, database, FTP or SFTP, and any email on the domain. Use a new, unique password for each.
- Back up the hacked site as it is. Download files and database and label the copy as infected. It keeps your content safe and shows how the attacker got in.
- Remove users you do not recognize and reduce any account that does not need admin rights.
- Pause ads and email campaigns that send people to the site until it is clean.
- Scan your own computer for malware. Stolen passwords often come from an infected laptop, and new passwords will be stolen again.
If you run Google Ads, pausing matters for a second reason: ads pointing to a compromised site can be disapproved, and clearing that takes time after the site is fixed.
How do you clean a hacked site?
You clean a hacked site by replacing every file that can be replaced with a fresh copy, then inspecting what is unique to your site. Deleting the one file a scanner flagged is rarely enough, because attackers leave more than one way back in.
- Scan the site. Use your host’s malware scanner and a security plugin such as Wordfence or Sucuri to list infected and changed files.
- Replace WordPress core. Re-install the current version from Dashboard > Updates, or upload a fresh copy from wordpress.org over the wp-admin and wp-includes folders.
- Re-install every plugin and theme from its original source. Delete the old folders first so nothing extra survives.
- Delete what you do not use. Inactive plugins and themes are still files an attacker can reach.
- Check the files you cannot replace. Look at wp-config.php, .htaccess and your theme’s custom files for code you did not write. Look in the uploads folder for PHP files, which do not belong there.
- Check the database. Look for unknown admin users, and for scripts or links injected into posts, pages and settings such as the site address.
- Check scheduled tasks on the server and in WordPress for jobs you did not create.
- Change the security keys in wp-config.php. This logs out every user, including the attacker.
- Update everything to the current version: WordPress, plugins, themes and the PHP version on the server.
- Scan again, then check the site while logged out, on a phone, and from a Google search result.
If any step above is unfamiliar, hand the cleanup to a WordPress developer or your host’s security team. A half-cleaned site is often reinfected, because a backdoor that was missed still works.
FREE WEBSITE AUDIT
Find Out What Your Website Is Costing You
JuvioX reviews your site’s speed, structure and conversion paths, then sends a prioritized list of what to fix first. Free, with no obligation.
When should you restore from backup?
Restore from backup when you have a copy taken before the hack began and you can afford to lose what changed since. It is quicker than cleaning by hand, but it brings back the same weakness the attacker used.
| Restore a backup | Clean the current site | |
|---|---|---|
| Best when | You know roughly when the hack began and have a backup from before it | No clean backup exists, or the hack has been there for a long time |
| Speed | Fast | Slower |
| What you lose | Orders, form entries, posts and edits made after the backup date | Nothing, if done carefully |
| Main risk | The backup is already infected, or the old weakness is still open | A hidden backdoor is missed |
| Must do afterward | Update everything, change all passwords, change security keys | The same |
Three cautions. Hacks often sit unnoticed for weeks, so the most recent backup may not be clean; scan the restored site before reopening it. An online store or booking site should export recent orders and customers before restoring. And a restore without updates and new passwords only resets the clock.
How do you get off Google’s warning list?
You remove Google’s warning by cleaning the site and then asking Google to review it in Search Console. The warning does not clear on its own schedule; you have to request the review.
- Open Google Search Console for the site. If you have never set it up, add and verify the site now.
- Open the Security Issues report. It lists what Google found and gives example pages.
- Fix every issue listed, using the examples to confirm they are gone.
- Select “Request review” and describe plainly what was wrong and what you did to fix it.
- Check the Manual Actions report as well, in case spam content led to a separate penalty.
- Wait for the result. Reviews are not instant and can take from days to weeks depending on the type of problem.
Ask for the review only when the site is fully clean. A request that fails slows the next one. Also ask your host to lift any suspension, and if a security company or browser has blocked the site, use its own removal form.
How do you secure a WordPress site afterwards?
You secure a WordPress site by closing the way the attacker got in, then keeping software current, logins strong and backups off the server. Start by finding the entry point, because securing everything except the actual hole changes nothing.
Your host’s access logs and the dates on the infected files usually point to it. The common causes are an outdated plugin or theme, a pirated (“nulled”) plugin or theme, a weak or reused password, or another infected site on the same hosting account.
Then work through how to secure a WordPress site for the long term:
☐ WordPress, plugins and themes are updated on a schedule, with someone responsible for it.
☐ Unused plugins and themes are deleted, not just deactivated.
☐ Plugins and themes come only from wordpress.org or the original developer.
☐ Every admin has a unique, strong password and two-factor login.
☐ Only people who need admin rights have them. Old staff and old agencies are removed.
☐ Login attempts are limited.
☐ Automatic backups run daily and are stored away from the web server.
☐ A restore from backup has been tested at least once.
☐ A security plugin or firewall is active and its alerts go to a monitored inbox.
☐ Hosting keeps each site separate and runs a supported PHP version.
☐ The site uses HTTPS and SFTP, never plain FTP.
☐ File editing from the WordPress dashboard is turned off.
What to prioritize depends on the site. An online store should put backups, two-factor login and payment plugin updates first, because customer and order data is at stake. A lead-generation site for a contractor, clinic or law firm should watch form plugins and redirects, since a hacked form or a redirect quietly kills inquiries. A membership or course site should review user roles regularly.
Most of this list is routine maintenance. How much website maintenance costs explains what a care plan should include and what you can do yourself.
If you are not sure whether your site is clean, or how exposed it is, JuvioX offers a free audit. Ongoing care is part of our website and landing page service, month to month with no lock-in.
FREE WEBSITE AUDIT
Find Out What Your Website Is Costing You
JuvioX reviews your site’s speed, structure and conversion paths, then sends a prioritized list of what to fix first. Free, with no obligation.
Frequently Asked Questions
Can a hacked website be recovered?
Yes, in most cases. A site can be restored from a clean backup or cleaned by replacing WordPress, plugin and theme files and removing injected code from the database. Your content is normally recoverable. Recovery is harder when no backup exists and the damage is extensive, which is why off-server backups matter.
How do I protect my WordPress site from hackers?
Keep WordPress, plugins and themes updated, delete what you do not use, give every admin a unique password with two-factor login, limit login attempts, run daily backups stored off the server, and use a security plugin or firewall. Most attacks succeed through outdated software or weak passwords.
Should you tell your customers?
If customer accounts, orders, payment details or form submissions may have been accessed, you may have a legal duty to notify the people affected. The rules vary by state and by industry. This is not legal advice: speak to a lawyer, and to your payment processor if you take card payments. If no personal data was involved, a short, honest notice is still good practice when visitors saw warnings or redirects.
Do you need a security plugin?
A security plugin or firewall is worth having for scanning, login protection and alerts, but it is one layer, not the whole answer. It will not make up for outdated plugins, weak passwords or missing backups. Check what your host already provides before adding another tool.
How long does it take to fix a hacked WordPress site?
It depends on how deep the infection is and whether a clean backup exists. A restore can be quick; a manual cleanup of a long-standing infection takes longer. Clearing a Google warning adds review time on top of the fix itself.








