How to Fix a Hacked WordPress Site: 3 Proven Ways

|
Background Gradient

If your WordPress site has been hacked, you need to act fast. The good news: most hacked WordPress sites can be cleaned up and secured using one of three approaches; manual malware removal, a dedicated security plugin, or a professional remediation service.

This guide walks you through all three, helps you spot the warning signs of a hack, and shows you how to prevent it from happening again.

Key Takeaway

WordPress

A hacked WordPress site typically shows signs like unexpected redirects, unfamiliar admin accounts, or search engine warnings.

WordPress

You can clean a hacked site manually, with a WordPress security plugin or by hiring a specialist agency.

WordPress

Outdated plugins, weak passwords, and insecure themes are the most common entry points for attackers.

WordPress

InstaWP’s managed cloud hosting includes built-in security features, InstaShield WAF, AI threat detection, and automated backups, to reduce your exposure from the start.

How Do I Know If My WordPress Site Has Been Hacked?

Catching a hack early limits the damage. These are the most common warning signs:

  1. Unfamiliar content or accounts: Strange blog posts, new pages you didn’t create, or unknown admin accounts appearing in your user list are classic signs of unauthorized access.
  2. Unexpected redirects: If visitors are being sent to unrelated or malicious sites, attackers have likely injected redirect code into your site’s files or database.
  3. Search engine warnings: Google flagging your site as “dangerous” or deindexing your pages signals that malware or phishing content has been detected.
  4. Sudden performance drops: Unexplained slowdowns, crashes, or resource spikes often mean your server is being used to send spam or host malicious files.
  5. Suspicious login activity: Multiple failed login attempts or successful logins from unfamiliar IP addresses point to brute-force attacks or compromised credentials.
  6. Modified core files: Changes to wp-config.php, .htaccess, or other core WordPress files that you didn’t make yourself are a serious red flag.

If you notice any of these, move to cleanup immediately.

Why Was My WordPress Site Hacked?

WordPress powers over 43% of all websites on the internet, which makes it a high-value target. But most attacks aren’t sophisticated; they exploit predictable, avoidable weaknesses.

  • Outdated software is the most common cause. Unpatched versions of WordPress core, themes, or plugins contain known vulnerabilities that attackers actively scan for.
  • Weak credentials make brute-force attacks trivial. Default usernames like “admin” and simple passwords are among the first things attackers try.
  • Untrusted plugins or themes downloaded from unofficial sources often contain malicious code baked in from the start. Even legitimate plugins become liabilities if their developers stop maintaining them.
  • Insecure file permissions can allow attackers to write or modify files directly on the server if your hosting environment isn’t properly hardened.

Most hacks are a combination of these factors, not a single vulnerability. Fixing one without addressing the others leaves you exposed.

How InstaWP’s Native Hosting Helps Reduce Your Risk

A significant portion of WordPress site hacks originate at the hosting level, misconfigured servers, insufficient security hardening, and no automated monitoring. InstaWP’s managed WordPress hosting is built to address this from the ground up.

WordPress

Every site on InstaWP runs on managed cloud infrastructure with security baked into the platform itself, not bolted on as an optional plugin.

  • InstaShield WAF blocks malicious traffic before it reaches your WordPress installation. Higher-tier pay-as-you-go managed hosting site plans include Advanced Shield with AI-powered threat detection that adapts to emerging attack patterns.
  • Automated backups run on a schedule tied to your site plan, weekly on Starter, daily on Plus and above, so you always have a clean restore point without having to think about it. You also get up to 3 on-demand back-ups on all the paid plans.
  • Uptime monitoring and maintenance reporting (available on higher plans) give you visibility into your site’s health, so anomalies surface quickly rather than going unnoticed for days.
  • Vulnerability scans run continuously, flagging known issues in your installed plugins and themes before attackers can exploit them.

This doesn’t make your WordPress site unhackable, no platform can guarantee that. But starting on infrastructure that’s already hardened, monitored, and backed up gives you a significantly stronger baseline than a bare shared hosting account.

How to Fix a Hacked WordPress Site?

If you’re confirmed that your WordPress site is hacked, here are some assured ways to get it fixed.

Way 1: Manual Removal of Malware/Issue

Manual cleanup is the most thorough approach when done correctly. It requires comfort with file systems and basic server tools, but gives you full visibility into what was compromised.

When to use this method: You’re technically confident, your site holds sensitive data (customer info, orders), and you need full control over what gets removed.

Steps to Remove Malware Manually

  1. Back up your site first. Before touching anything, create a complete backup of your files and database. If something goes wrong, you’ll need this to recover.
  2. Scan your files. Look for unfamiliar or recently modified files; especially in the root directory, wp-content/uploads, and active theme folders. Core files like wp-config.php and .htaccess are frequent targets.
  3. Audit your user accounts. Go to Users → All Users in your WordPress dashboard and look for any unfamiliar admin accounts. Hackers frequently create backdoor accounts to maintain access after initial entry.
  4. Remove or replace compromised files. Delete malicious files entirely or replace them with clean versions from the official WordPress repository or your plugin/theme vendor.
  5. Change all credentials. Reset all admin passwords, update your database password in wp-config.php, and regenerate your WordPress security keys.

Tools for Manual Cleanup

  • cPanel or FTP: Direct file access to search for and remove anomalies
  • WP-CLI: Command-line tools for bulk operations, faster than the dashboard for large cleanups. If you’re building with InstaWP, you get build-in command-line.
WordPress
  • VirusTotal: Free tool to scan suspicious files and URLs for known malware signatures

Way 2: Using a Security Plugin

If manual cleanup isn’t your preferred route, dedicated WordPress security plugins can automate most of the process. Two of the most reliable options:

Wordfence

Wordfence is one of the most widely used WordPress security plugins, with a powerful built-in firewall and deep malware scanner.

  • Malware scanning: Identifies infected files, malicious redirects, and known vulnerabilities
  • One-click cleanup: Removes or restores compromised files directly from the dashboard
  • Firewall: Blocks attack traffic before it reaches WordPress

Malcare

Malcare is built for speed; it runs scans on its own servers, so your site performance isn’t affected during scanning.

  • One-click cleanup: Removes malware without manual intervention
  • Real-time firewall: Blocks suspicious traffic automatically
  • Daily automated scans: Catches issues before they escalate

Both plugins offer free versions with core scanning capabilities and paid plans for automated cleanup and continuous protection.

Way 3: Hiring a Professional Agency

When the hack is severe, data is at risk, or you simply don’t have the time to manage cleanup yourself, bringing in professionals is the right call.

  • Seahawk Media: Offers custom WordPress hack remediation tailored to your specific situation
  • Sucuri: Starting at $199/year, Sucuri provides professional malware removal plus an ongoing firewall to prevent recurrence
  • Malcare: Beyond its plugin, Malcare also offers hands-on cleanup services for complex infections

Professional remediation is worth the investment when your site handles customer data, processes payments, or generates significant revenue; the cost of downtime typically exceeds the cost of the service

WordPress Site Security: Prevention Best Practices

Once your site is clean, keeping it that way requires consistent habits.

  • Use strong, unique passwords for every account, admin, FTP, database, and hosting. A password manager makes this manageable.
  • Enable two-factor authentication (2FA) on all admin accounts. Even if a password is compromised, 2FA blocks unauthorized access.
  • Keep everything updated. WordPress core, themes, and plugins should be updated as soon as new versions are available. Most successful attacks exploit known, already-patched vulnerabilities.
  • Limit login attempts. Plugins like Limit Login Attempts Reloaded or your hosting-level firewall can block brute-force attacks automatically.
  • Remove unused plugins and themes. Inactive software still represents an attack surface, if you’re not using it, delete it.
  • Run weekly security scans and store backups in a secure, offsite location.
  • Audit user roles regularly. Remove accounts that no longer need access and make sure no one has admin privileges they don’t need.

Clean Up Your Site. Then Build on Stronger Ground.

A hacked WordPress site is recoverable, but the experience is a strong argument for hardening your foundation before the next attack. Whether you choose manual cleanup, a security plugin, or professional help, the cleanup process is only half the job. The other half is making sure you’re not starting from a vulnerable baseline.

Don’t wait for a hack to think about security. InstaWP’s managed hosting gives you WAF protection, automated backups, and real-time monitoring built in from the very first site you create.

Start building secure sites →

FAQs

1. What should I do if my WordPress site is hacked?

Take your site offline or put it in maintenance mode immediately to prevent further damage or visitor exposure. Then create a full backup of your current state, even the compromised version, before beginning any cleanup. This preserves evidence and gives you a recovery point.

2. Can I clean a hacked WordPress site without technical knowledge?

Yes. Security plugins like Wordfence and Malcare are designed for non-technical users and can handle most cleanup automatically. For severe or complex hacks, hiring a professional agency is the safest option if you’re not comfortable in the file system.

3. How do I know if my WordPress site is still vulnerable after cleanup?

Run a full scan with a security plugin after cleanup, verify all plugins and themes are updated, audit all user accounts, and change every password associated with the site. Consider a professional security audit if the original attack vector isn’t clear.

4. Does InstaWP provide security features for hosted sites?

Yes. InstaWP’s managed hosting includes InstaShield WAF, AI threat detection, vulnerability scanning, real-time monitoring, and automated backups, all built into the platform’s site plans rather than requiring separate plugin setup.

5. How often should I run security scans on my WordPress site?

At minimum, run a full scan weekly. Daily automated scanning (available through plugins like Malcare or through InstaWP’s higher-tier hosting plans) is preferable for sites handling e-commerce, memberships, or sensitive user data.

Vikas Singhal

Founder, InstaWP

Vikas is an Engineer turned entrepreneur. He loves the WordPress ecosystem and wants to help WP developers work faster by improving their workflows. InstaWP, the WordPress developer’s all-in-one toolset, is his brainchild.
Like the read? Then spread it…
Facebook
Pinterest
LinkedIn
Twitter
You might also like

Get $25 in free credits — start building today.

Create your first site and unlock all premium features today.

Request demo

Wondering how to integrate InstaWP with your current workflow? Ask us for a demo.

Contact Sales

Reach out to us to explore how InstaWP can benefit your business.