How to Fix a Hacked WordPress Site: Steps & Costs (2026)

Quick answer: Here is how to fix a hacked WordPress site: first take a full backup and change every password. Then reinstall WordPress core, themes and plugins from clean sources, and remove malicious files, hidden admin users and database injections. Finally, close the hole the attacker used and ask Google to review the site. A professional cleanup typically costs about $249–$600 for a small business site, and more for large or badly infected stores.
Finding out your website has been hacked is stressful. For example, visitors may land on spam pages, or Google may show a red “This site may be hacked” warning. Your host may even suspend your account. So every hour the problem stays live costs you leads and trust.
This guide shows how to fix a hacked WordPress site step by step, the way a practitioner cleans one up. First, you will see what to do in the first hour. Then we cover malware removal, Google warnings, typical cleanup costs in the USA, and how to stop it happening again.
In this guide
- Signs your WordPress site has been hacked
- What to do in the first hour
- How to fix a hacked WordPress site: step by step
- Removing Google’s hacked site warning
- How much does it cost to fix a hacked WordPress site?
- DIY vs hiring a malware removal service
- How to keep your site from being hacked again
- Frequently Asked Questions
Signs your WordPress site has been hacked
Some hacks are obvious. Others, however, stay hidden so the attacker can keep using your site for spam or to infect visitors. So watch for these warning signs:
- Strange redirects: visitors end up on scam, pharmacy or gambling sites. Often this only happens to mobile users or people arriving from Google.
- Spam in search results: Google shows Japanese or pharmacy keywords, or pages you never created, when you search
site:yourdomain.com. - Browser or Google warnings: for example, “This site may be hacked” in results, or a red “Deceptive site ahead” screen.
- Unknown admin users in Users, or new plugins you didn’t install.
- Host emails about malware, high resource use or outgoing spam, or even a suspended account.
- A sudden slowdown, a broken layout or unfamiliar files in
wp-content/uploads.
If you see one or more of these, treat the site as compromised. After all, patching one symptom, such as deleting a single spam page, rarely fixes the real problem.
What to do in the first hour
Before you start deleting files, protect yourself and keep the evidence. These quick moves also limit the damage:
- Don’t panic-delete. Removing random files can break the site. It also destroys clues about how the attacker got in.
- Take a full backup of files and the database, even though it’s infected. Then label it “infected” so nobody restores it by mistake.
- Change passwords for WordPress admins, hosting, SFTP, the database and your email, from a computer you trust.
- Tell your host. Many hosts can share access logs and scan results. Some will also lift a suspension while you clean up.
- Consider maintenance mode if the site redirects visitors or takes payments. That way, customers stay safe while you work.
If you’d rather not touch the server yourself, this is the moment to bring in a WordPress malware removal service. A good provider starts with a backup and a diagnosis before changing anything.

Need help with this? AK Softs Digital builds websites, mobile apps and AI automation for small businesses in the USA, UK, UAE and Australia. Message us on WhatsApp or get a free quote in 24 hours.
How to fix a hacked WordPress site: step by step
This is the standard cleanup process a careful developer follows. It assumes you have hosting and SFTP access. If any step feels risky, stop and get help, because a half-finished cleanup often leads to reinfection.
1. Scan and map the infection
First, run a server-side scan, since many hosts include one. Then add a scan from a reputable security plugin. Note every flagged file and every recently modified file. Also look for unknown PHP files inside wp-content/uploads, because PHP should almost never live there.
2. Replace WordPress core with a clean copy
Next, download a fresh copy of WordPress from wordpress.org. Then replace the wp-admin and wp-includes folders entirely. After that, compare wp-config.php and .htaccess line by line against a clean version. Attackers often hide injected code in both files.
3. Reinstall plugins and themes from trusted sources
Delete every plugin and theme folder. Then reinstall fresh copies from wordpress.org or the official vendor. Also remove anything you no longer use. Above all, never reinstall “nulled” (pirated) premium plugins, because they can come with hidden backdoors.
4. Clean the uploads folder and the database
Remove PHP and other executable files from uploads. In the database, look for injected <script> tags or spam links in posts and options. Also check the users table for unknown admin accounts. Finally, look for suspicious scheduled tasks (cron jobs) that re-create malware.
5. Reset keys, passwords and sessions
Generate new security keys and salts in wp-config.php so everyone gets logged out. Then reset every user’s password. In addition, turn on two-factor authentication for all admin accounts.
6. Find and close the entry point
DIY cleanups skip this step most often. So check access logs and plugin versions to work out how the attacker got in, and then fix it. Plugins are the first place to look. For example, Patchstack’s State of WordPress Security in 2025 report found 7,966 new vulnerabilities in 2024. Of those, 96% were in plugins and only seven in WordPress core.
7. Rescan and test everything
Scan again, and then check pages on desktop and mobile. Also test forms and checkout. Next, search Google for site:yourdomain.com to spot leftover spam URLs. Keep a short log of what you found and changed, because you will need it for the Google review.
Removing Google’s hacked site warning
Google’s warning doesn’t disappear on its own the moment you clean up. Instead, you need to tell Google the site is fixed through Search Console:
- Open the Security Issues report in Google Search Console and read every issue listed.
- Make sure you fixed every affected page, not just the sample URLs Google shows.
- Click “Request Review” and explain the problem, the steps you took and the result.
- Then wait for the decision email, and don’t resubmit while a request is still pending.
According to Google’s Security Issues report help page, a review for hacked or malware issues can take from a few days to a few weeks. That’s why a clear, detailed request matters. In short, it shows Google you fixed the root cause.
How much does it cost to fix a hacked WordPress site?
Cost depends on how bad the infection is, how big the site is, and whether it’s an online store. Here are typical ranges for USA small and mid-sized business sites:
| Option | Typical cost | Best for |
|---|---|---|
| DIY with free scanners | $0 + your time (often a full day or more) | Simple infections, technical owners |
| Professional one-time cleanup | $249–$600 | Most small business sites |
| Cleanup + speed and plugin audit | $499–$900 | Sites that are also slow or bloated |
| Severe infection, large site or WooCommerce store | $600–$1,500+ | Reinfected sites, stores, multisite |
| Ongoing protection plan | $129–$300 per month | Businesses that can’t afford downtime |
Now compare that with the hidden cost of waiting. For example, you lose leads, waste ad spend on a flagged site, and wait for Google to lift a warning. If you’re planning a wider rebuild at the same time, you can estimate your project cost in a couple of minutes. Also, for full website budgets, see our guide to small business website cost.
DIY vs hiring a malware removal service
DIY can work for a small, simple infection if you’re comfortable with SFTP, file comparisons and phpMyAdmin. However, it’s risky when:
- The site got reinfected after a previous cleanup, so a backdoor is still there.
- You run an online store or take bookings and payments.
- Google or your host has already flagged or suspended the site.
- You can’t tell which files are legitimate and which are malicious.
When you hire help, ask for a fixed quote and a full backup before any changes. Also ask for a written cleanup report that names the entry point, plus help with the Google review. Above all, avoid anyone who just installs a plugin and calls it done.
How to keep your site from being hacked again
Cleaning a site is only half the job. The official WordPress hardening guide recommends keeping WordPress updated and using strong passwords with two-step authentication. It also recommends regular backups and tight file permissions. So use this checklist after every cleanup:
- ☐ Update WordPress, plugins and themes, ideally on a staging copy first.
- ☐ Delete unused plugins, themes and old admin accounts.
- ☐ Turn on two-factor authentication for every admin.
- ☐ Keep daily off-site backups and test a restore once in a while.
- ☐ Add a web application firewall plus malware and uptime monitoring.
- ☐ Block PHP execution in the uploads folder.
- ☐ Replace plugins that nobody maintains anymore.
That last point matters a lot. In fact, the same Patchstack report says 33% of vulnerabilities in 2024 had no fix by the time of public disclosure. If you don’t have time to watch for this, a website care and maintenance plan handles updates, backups and monitoring for you.
For the basics, see our post on WordPress security tips for beginners. Also, a clean site is a good moment to speed up your WordPress website.
Key Takeaways
- Back up first, change all passwords, and don’t delete files at random.
- Replace core, plugins and themes with clean copies, then clean uploads and the database.
- Find and close the entry point, or else the hack will come back.
- Request a Google review in Search Console; it can take a few days to a few weeks.
- A professional cleanup typically costs $249–$600 for a small business site, and more for stores or severe infections.
Frequently Asked Questions
Can I fix a hacked WordPress site myself?
Yes, if the infection is simple and you’re comfortable with SFTP and the database. The key is to replace files with clean copies, clean the database and close the entry point. However, if the site keeps getting reinfected, a professional cleanup is usually faster and cheaper overall.
How much does WordPress malware removal cost?
For a typical small business site, a one-time professional cleanup usually costs about $249–$600. Severe infections, large sites and WooCommerce stores typically run $600–$1,500 or more. Ongoing protection plans, by contrast, typically start around $129 per month.
Will I lose my content or design during a cleanup?
Not if the work is careful. A good cleanup takes a full backup first and then replaces only infected files and database entries. As a result, your pages, posts and design stay intact.
How long does it take Google to remove the hacked warning?
After you request a review in Search Console, Google says a review for hacked or malware issues can take from a few days to a few weeks. Also, a detailed request that explains what you fixed helps.
Why does my WordPress site keep getting hacked?
Usually, a backdoor file stayed behind, or nobody fixed the original weakness. For example, that could be an outdated plugin, a nulled theme or a weak password. So finding and closing the entry point is what stops repeat infections.
Need Your Hacked Site Fixed Fast?
Our WordPress malware removal service cleans infected sites, closes the entry point and helps you request Google reviews. AK Softs Digital has 175+ client reviews and a 4.9 rating. Tell us what’s happening, and we’ll suggest the next step in a free consultation.
Web Development
Get a clear plan and a fixed quote in one call
Need a fast, high-converting website? We build and fix WordPress, WooCommerce and custom Node.js sites.
