Themewinter Blog WordPress How to Fix a Hacked WordPress Website: Complete Recovery Guide

How to Fix a Hacked WordPress Website: Complete Recovery Guide

how to fix a hacked WordPress site

A hacked WordPress site can damage your traffic, user trust, and search visibility fast. You may see strange redirects, unknown admin users, spam pages, malware warnings, or sudden ranking drops.

The safest way to recover is to contain the site first, back up everything, scan for malware, clean infected files and database entries, then secure every access point.

This guide shows you how to fix a hacked WordPress website step by step, even if you are not a developer. You will also learn how to confirm the site is clean, remove Google warnings, and prevent the same attack from coming back.

Let’s start by understanding a few things before you begin the cleanup.

Before You Begin

Emergency Checklist: What to Do First If Your WordPress Site Is Hacked

Before diving into cleanup, set your website up for a safe recovery. These quick steps help preserve evidence, prevent further damage, and make the process smoother.

Essential Prep (Do These First)

1
Put your site in maintenance mode.

Temporarily block public access using your host panel or a plugin. This prevents visitors and search engines from viewing compromised pages.

2
Back up everything — even if it’s infected.

Save /wp-content/, wp-config.php, and the full database. You’ll need this snapshot if anything goes wrong during cleanup.

3
Contact your hosting provider.

Most managed hosts can scan for malware or restore a clean backup. Open a support ticket early for faster help.

4
Gather and audit credentials.

List admin users, SFTP/SSH, and database access. You’ll reset and verify them after cleanup to close possible backdoors.

5
Prepare your toolkit.

Have these ready: Wordfence or Sucuri for scanning, FileZilla or hosting file manager, UpdraftPlus or BlogVault for backups, and WP Activity Log for tracking changes.

6
Keep a log of your actions.

Note each step as you go. It’ll help if you need to reverse a change, request a Google review, or bring in a professional.

Tip: Don’t rush to file a Google reconsideration request until the site is fully clean and stable.

Quick Toolkit

  • Scan Wordfence, Sucuri SiteCheck, WPScan
  • Files SFTP/SSH (FileZilla), Host File Manager
  • Backups UpdraftPlus, BlogVault, or manual ZIP + SQL export
  • Logs WP Activity Log, server access/error logs
When to call a professional: If you suspect stolen user data, ecommerce payment info exposure, or repeated reinfections after cleanup.
Outcome: Your site is safely contained and ready for secure cleanup.

Pre-Cleanup Checklist

Enable maintenance or password protection
Create a full backup (files + database)
Contact hosting provider and review logs
Audit admin users and credentials
Prepare scanning and backup tools
Next up: Signs Your WordPress Site Is Hacked Estimated time: 10–15 minutes

Security note: If your hacked WordPress site stores customer accounts, payment data, bookings, or form submissions, contact your hosting provider or a WordPress security expert before deleting files. A cleanup mistake can remove evidence, break the site, or leave hidden backdoors active.

Eventin Event Manager Plugin for Events Calendar, Tickets Selling, Registrations.

How do you know that your WordPress site has been hacked?

A WordPress site is likely hacked when you see strange redirects, unknown admin users, spam pages in Google, malware warnings, suspicious server activity, or complaints from visitors. One issue may be a plugin conflict. But if two or more signs appear together, treat it as a possible security breach and start containment.

Not every website issue means your WordPress site has been hacked. A broken layout, failed update, or plugin conflict can also cause problems. But when unusual signs appear in different areas of your site at the same time, you need to investigate quickly.

Most hacked WordPress websites show warning signs in five places:

  • What visitors see on the frontend
  • How your WordPress dashboard behaves
  • What Google and other search engines report
  • What your server logs and files show
  • What customers, users, or visitors report

If two or more of these areas look suspicious, do not wait. Put the site in maintenance mode, take a full backup, scan for malware, and check for unknown admin access.

1. Visual or Frontend Symptoms

The fastest signs of a hacked WordPress site usually appear on the frontend.

Your homepage may look different. New banners, popups, or strange links may appear without your approval. Some pages may push fake antivirus alerts, suspicious download buttons, or ads for products you never added.

A serious red flag is an unexpected redirect. For example, visitors may open your website but land on adult, gambling, pharma, crypto, or spam pages. This often means your theme files, plugin files, .htaccess file, or database has been injected with malicious code.

You should suspect a hack if you notice:

  • Your site redirects users to unknown websites
  • Popups or ads appear without your permission
  • Your homepage or key pages look changed
  • Fake download buttons or warning messages appear
  • New pages appear that you did not create

2. Dashboard and Admin Anomalies

Your WordPress dashboard can show strong signs of unauthorized access.

If you cannot log in, your admin password no longer works, or you see admin users you did not create, assume someone else may have access. Attackers often create hidden admin accounts so they can return even after you remove visible malware.

You may also notice unknown plugins, changed theme files, disabled settings, or new code inside theme/plugin editors. In some cases, attackers change site URLs, user roles, permalink settings, or plugin settings to keep control of the site.

Check your dashboard for:

  • Unknown admin users
  • New plugins or themes you did not install
  • Changed site settings
  • Disabled security plugins
  • Locked admin access
  • Suspicious changes in theme or plugin files

These signs often mean the attacker has created a way to stay inside your site.

3. SEO and Search Warnings

Search engines often detect hacked content before site owners do.

Google Search Console may show warnings like Hacked content, Malware, Deceptive pages, or Security Issues. Your site may also show a browser warning such as “This site may be hacked” or “Deceptive site ahead.”

Another common sign is spam pages appearing in Google. For example, your branded search results may show Japanese, Chinese, pharma, casino, or unrelated product pages that you never published. This is usually caused by SEO spam injection.

Watch for these SEO warning signs:

  • Google Search Console reports malware or hacked content
  • Search results show pages you never created
  • Your title tags or meta descriptions look changed
  • Organic traffic drops suddenly
  • Impressions spike for irrelevant keywords
  • Google shows unsafe site warnings

If your search results look hijacked, your site may be infected with SEO spam malware.

4. Server and File Activity

Some hacks are not visible on the website. They hide inside your files, database, or server activity.

Look for sudden CPU spikes, high bandwidth usage, unusual database load, or too many scheduled tasks. These can happen when malware sends spam, runs hidden scripts, creates fake pages, or attacks other websites from your server.

Your file manager or hosting panel may also show suspicious files. A common warning sign is a PHP file inside the /wp-content/uploads/ folder because uploads should usually contain images, PDFs, videos, or media files, not executable scripts.

Check for:

  • Suspicious PHP files in /wp-content/uploads/
  • Recently modified core WordPress files
  • Unknown files with random names
  • Strange timestamps on plugin or theme files
  • Too many cron jobs
  • Repeated login attempts
  • Repeated POST requests to wp-login.php or xmlrpc.php

These signs can point to active malware, a hidden backdoor, or a brute-force attack.

5. User and Customer Complaints

Sometimes your visitors notice the hack before you do.

A customer may report that your site redirects during checkout. A visitor may see a browser warning. A user may say they cannot log in. Someone may receive strange emails from your domain. These complaints should be taken seriously, especially if your site handles payments, bookings, registrations, or customer accounts.

Common user-reported signs include:

  • Browser warnings before opening your site
  • Redirects during checkout or form submission
  • Login issues for normal users
  • Strange emails sent from your domain
  • Password reset emails users did not request
  • Payment or booking pages behaving strangely

If users report security issues, check your site immediately. A hacked WordPress site can damage trust, reduce conversions, and put customer data at risk.

Quick ways to confirm before you panic

  • Run a malware scan (Wordfence, Sucuri SiteCheck).
  • Check Search Console → Security issues and Manual actions.
  • Compare file integrity on the server (look for recent changes to index.php, functions.php, or unexpected .php in /uploads/).
  • Review access/error logs for bursts of POST requests to xmlrpc.php, wp-login.php, or unknown endpoints.

Red Flag Checklist

  • Homepage defaced, unexpected pop-ups, or redirects to unknown sites
  • New admin users or login lockouts you didn’t trigger
  • Unknown plugins/themes or settings changed without your action
  • Google flags “Hacked content” or SERPs show spammy foreign-language pages
  • CPU/bandwidth spikes, suspicious cron jobs, or odd file timestamps
  • Unexpected PHP files in /wp-content/uploads/ or edited core files
  • User reports of browser warnings, redirects, or failed checkout/login
  • Emails from your domain suddenly land in spam or start bouncing
If you mark 2+ items, proceed as if compromised and move to the cleanup steps.
WPCafe Online Food-Ordering Restaurant Menu Delivery and Reservations for WooCommerce

Why WordPress website get hacked?

Let’s clear a myth up front: WordPress core isn’t “insecure by default.”

Most compromises come from the attack surface around it, outdated plugins/themes, weak credentials, misconfigured servers, and sloppy operational habits.

Attackers don’t need zero-days when old vulnerabilities, reused passwords, and exposed files are everywhere.

Below are the real reasons sites get popped—and what makes each vector attractive to attackers.

  • Outdated software (plugins, themes, core)

Vulnerabilities disclosed months (or years) ago are still exploitable if you haven’t updated. One unpatched plugin is enough to hand over file write access or database control.

Auto-updates dramatically shorten the “window of exposure.”

Old contact-form or slider plugin with an unauthenticated file upload bug → attacker drops a PHP web shell → persistence/backdoors across the site.

  • Weak or reused credentials (no 2FA)

Credential stuffing is cheap and automated. If you reuse the same password elsewhere, it will be tried on /wp-login.php and xmlrpc.php. Without 2FA or rate-limiting, bots grind away until something works.

Brute-force spikes in logs, logins from unusual IP ranges, and unknown admin accounts suddenly appearing.

  • Vulnerable or “nulled” themes & plugins

Pirated (“nulled”) packages often ship with malware pre-installed—SEO spam injectors, backdoors in functions.php, or cron-based payload reloaders. Even legitimate add-ons can become risky if their maintainers stop shipping security fixes.

So what’s the solution? Only install from reputable publishers, verify changelogs, and remove anything you no longer use.

  • Insecure file permissions & executable uploads

If your server allows PHP to execute inside /wp-content/uploads/, a simple image upload vector becomes remote code execution. Over-permissive modes (e.g., 775/777) make it worse.

Therefore, lockdown to 644 files / 755 folders, disable PHP in uploads/ via .htaccess or web server rules.

  • Exposed secrets, backups, and build artifacts

Attackers don’t need to hack what you’ve already published by accident. Publicly accessible backup.zip, .env, .git/, composer.lock, or old staging copies (/dev/, /old/) often contain DB credentials or keys.

So, quick crawl your domain for common leak paths and disable directory indexing.

  • Input vulnerabilities (SQLi, XSS, RCE) in add-ons

Many exploits start in form handlers, AJAX endpoints, or REST routes inside plugins/themes. Poorly sanitized input → SQL injection or stored XSS → privilege escalation → file write.

For instance, keep add-ons updated, limit what’s installed, and prefer vendors with a security disclosure process.

  • Unprotected endpoints (xmlrpc, wp-login, admin-ajax)

xmlrpc.php enables pingbacks and remote publishing—but it’s also a brute-force amplifier and DDoS participant. admin-ajax.php And custom REST routes can be hammered if not rate-limited.

Throttle or disable XML-RPC if you don’t need it; add WAF rules, reCAPTCHA/Turnstile, and login rate limits.

? Don’t let small WordPress errors become big problems

Many hacked or broken sites start with tiny issues—plugin conflicts, update failures, or PHP errors left unfixed. Over time, those cracks turn into security holes. Fix the basics early and keep your site healthy.
Helpful read: Explore our detailed troubleshooting guide → 15 Common WordPress Errors and How to Fix Them .

  • Server & stack misconfigurations

Old PHP versions, missing HTTP security headers, no WAF, and noisy error output all widen the blast radius. Shared hosting without isolation can let a neighbor’s compromise spill over.

Current PHP/LTS, OPCache, HTTPS only, sane open_basedir, error display off, and a per-site pool/container on the host.

  • Compromised admin devices & phishing

Sometimes the weakest link isn’t the server. A keylogger on a marketer’s laptop or a convincing “WordPress security update” phishing email hands over admin credentials.

Enforce 2FA + hardware keys for admins, SSO where possible, and least-privilege roles.

  • Supply-chain and repo trust

Attackers target what devs trust: CDNs, analytics snippets, or third-party SDKs. A single compromised script loads malicious JS on every page (skimmers, crypto-miners, drive-by redirects).

Pin versions/hashes (SRI), self-host critical assets, and audit third-party inclusions.

  • eCommerce-specific risks (WooCommerce)

Checkout pages are magnets for skimmers. Malicious JS injected into themes/plugins captures card data; outdated order or coupon extensions expose privileged endpoints.

Content Security Policy (CSP), subresource integrity, server-side validation, and continuous file-integrity monitoring on payment templates.

  • Excessive privileges & stale accounts

Give everyone administrator, forget ex-contractor access, and skip API key rotation—now every leaked credential is a site-wide breach.

Least privilege (Author/Editor where possible), quarterly access reviews, rotate API keys/tokens, and audit cron jobs.

Hacks aren’t random lightning strikes. They’re the predictable outcome of unpatched code, weak auth, exposed assets, and misconfigurations. Close those four doors and you remove 90% of the practical attack surface.

Action takeaway: fix these four and you’ll likely block ~90% of real-world attacks.

How do hackers target WordPress sites for hacking?

Hackers don’t “discover” sites. They scan them nonstop. Automated bots look for easy wins: weak logins, old plugins, open APIs, and upload points that run code.

If you reuse passwords, bots try them. If one works, they’re in. If a plugin has a known hole, exploit scripts test it the moment it’s published.

So what should you do first? Simple: lock logins, update everything, block or rate-limit exposed endpoints, and stop PHP from running in uploads.

Fix those four things, and most bots will keep scrolling to an easier target.

That’s the playbook. Now, check briefly how hackers target WordPress sites for hacking:

1. Brute force and credential stuffing

Bots try lots of username/password combos until one works. With credential stuffing, they use real passwords leaked from other sites (because many people reuse passwords).

You will see many failed logins, lockouts, strange IPs in logs, or a sudden new admin account.

Therefore, you need to follow these:

  • Use long, unique passwords + 2FA for all admins.
  • Change the default “admin” username.
  • Rate-limit logins and throttle/disable XML-RPC if you don’t need it.
  • Put a WAF (Cloudflare/Sucuri) in front of the site.

2. SQL injection and XSS

  • SQLi lets attackers push malicious queries into your database (e.g., via an insecure form), and it leads to data theft or account takeover.
  • XSS injects malicious JavaScript into pages so it runs for your visitors or admins (stealing cookies, injecting spam, etc.).

Once these happen to your website, you will see some strange admin users, redirect spam, weird content in posts, or foreign-language pages appearing in Google.

So you need to:

  • Keep plugins/themes updated; remove what you don’t use.
  • Prefer well-maintained plugins with active security fixes.
  • Use a security plugin/WAF that filters bad requests.
  • Sanitize/escape custom code; avoid eval/unsafe input in custom forms.

3. Through outdated plugins

Attackers scan the web for known plugin bugs and automate exploitation. One old plugin with an upload or auth-bypass flaw is enough to take over.

So you will notice the unknown plugins or files appear, settings change on their own, or reinfections after you “clean” the site.

After getting these, you need to:

  • Turn on auto-updates for trusted plugins (or update weekly).
  • Delete inactive or abandoned plugins/themes.
  • Only install from reputable publishers; avoid nulled software.
  • Monitor plugin news for major security releases.

4. Using weak REST API endpoints

Vulnerable or poorly secured REST routes (or admin-ajax.php actions) can expose data or let attackers perform actions without proper checks. The result? You will see odd API calls in logs, mass edits, or data leaking without anyone logging in.

Then these immediate actions can be taken:

  • Keep core, themes, and plugins fully updated.
  • Limit who can access sensitive routes; add nonce checks in custom code.
  • Use a WAF to rate-limit and block suspicious patterns.
  • Disable routes you don’t need (especially in custom builds).

5. Uploading malicious PHP shells

An insecure upload feature (or a plugin flaw) lets an attacker upload a disguised “image” that’s actually a PHP web shell. Once it runs, they can edit files, add users, or install backdoors.

Therefore, PHP files inside /wp-content/uploads/, odd file timestamps, cron jobs you didn’t create, or repeated reinfection.

Here are the things to follow after encountering the attack:

  • Block PHP execution in /uploads/ (server rule or .htaccess).
  • Use correct file permissions (644 files / 755 folders).
  • Restrict file types on upload; validate MIME types and file headers.
  • Scan regularly for unexpected .php files outside core paths.

Remember: Most attacks aren’t magic; they’re old bugs, weak logins, open endpoints, or unsafe uploads. Keep everything updated, enforce 2FA, put a WAF in front, and disable PHP in /uploads/.

Do those four things and you’ll block the vast majority of real-world attempts.

However, most of the users think that WordPress is dying, and due to that, they do not often nurture their websites. But our expert team has a different point of view. We figured out everything and answered to that mighty question roaming around everywhere. Check the video below!

How to fix a hacked WordPress website (9 easy steps)

Now the most crucial part comes: “How to solve or fix a hacked WordPress site?”. There are so many tutorials and guides on the web. But most are scattered or overly technical.

So we’ve broken everything down into nine simple, organized steps that anyone can follow, even if you’re not a developer or a technical person.

Let’s fix a hacked WordPress website.

1. Isolate the website (maintenance mode/password protect)

Before doing anything else, you need to remove all access to the hacked site, both for your visitors and for search engines.

It will prevent further damage, data leaks, or the spread of malware to users. The goal is simple: contain the infection before cleaning it up.

So, how to do it? Here you go:

  • Enable maintenance mode using a plugin like SeedProd or LightStart (Maintenance Mode).
  • Or, if your WordPress dashboard is inaccessible, use your hosting control panel to password-protect the site or disable public access temporarily.
  • Some hosts even let you suspend the domain or move files into a quarantine folder directly from cPanel or the hosting dashboard.

Once the site is fully closed, verify that visitors can’t see the infected pages. If you’re on a shared server, let your hosting provider know immediately. A single infected site can spread malware to other accounts on the same server.

2. Instantly take a backup of your hacked site

Before you do anything to a single file, take a complete backup of your hacked website, yes, even if it’s infected.

Why? Because a backup keeps your important data in your hand for further use. If something breaks during cleanup or you accidentally delete an important file, you can always roll back to this snapshot. It also helps security experts analyze what went wrong later.

Here’s what to include in your backup:

  • The entire /wp-content/ folder (themes, plugins, and uploads)
  • The wp-config.php file (contains your database details)
  • Your database export (via phpMyAdmin or your hosting panel)

You can use backup tools like UpdraftPlus, BlogVault, or simply zip your files using your hosting file manager. Once done, store that backup outside your web server — on your computer or cloud storage (Google Drive, Dropbox, etc.).

Therefore, you need to name it clearly, like infected_backup_October2025.zip. This way, you’ll never confuse it with a clean version later.

3. Scan for malware (plugins or server-level tools)

Now that your site is safe and backed up. It’s time to find out what went wrong.

For instance, you need to scan to identify the files, code, or database entries that were infected, so you know exactly what to clean.

Start with a WordPress security plugin like:

  • Wordfence: Great for detecting malicious code, unknown admin users, and file changes.
  • Sucuri SiteCheck: Quick online scan for hidden malware or spam links.
  • MalCare or WPScan: Advanced tools that check deeper into plugin vulnerabilities.

If you have server access, most hosting providers (like Kinsta, SiteGround, or Hostinger) also offer built-in malware scanners. Run both the plugin-level and server-level scans to be thorough.

Once the scan is done, note every suspicious file path, modified date, or injected script. Don’t delete anything yet; some flagged files may be marked as false positives. Therefore, keep a simple log file name, location, and issue found. You’ll use this list in the next step when you start cleaning up.

4. Clean files manually (delete suspicious code/backdoors)

This is where you start getting your hands dirty, removing the malicious code that infected your site. Don’t worry, you don’t need to be a developer. You just need to know what looks normal and what doesn’t.

For that, first, open your site files using File Manager in your hosting dashboard or an FTP client like FileZilla.

Here’s what to focus on:

  • Check core WordPress folders /wp-admin/, /wp-includes/, and /wp-content/ for any files that look out of place.
  • Watch for strange names like wp-login-old.php, config-backup.php, or random .zip or .txt files.
  • Look inside files for suspicious functions like base64_decode(), eval(), gzinflate(), or long strings of unreadable code.

If you find something shady, don’t edit it live. Instead, you can:

  1. Download the file.
  2. Remove the malicious code in a text editor.
  3. Upload a clean version back to your server.

You can also compare your files against a fresh copy of WordPress from wordpress.org/download. If a file doesn’t match, replace it.

Remember: Never overwrite your wp-config.php or wp-content/uploads/ folders, they contain your unique settings and media files. Clean them carefully instead of deleting.

⚠️ Don’t wait for the next breach

Every hour your site stays unprotected, automated bots are testing passwords, plugins, and upload forms. If they get in once, they’ll try again—harder. Lock things down now.
Quick win: Read this practical guide and apply the fixes today → WordPress Security Against AI-Driven Hacking .

5. Check the database for injected content

Even after you’ve cleaned your files, hidden malware can still live inside your database, quietly injecting spam links, fake users, or malicious scripts. That’s why this step is crucial.

Start by logging into phpMyAdmin (or your host’s database manager). From here, you can browse and search inside your WordPress tables.

Here’s what to look for:

  • In the wp_posts table: Search for strange <script>, <iframe>, or suspicious URLs inside your posts or pages.
  • In wp_options: Check for unknown entries or values that contain long, encoded text or random characters.
  • In wp_users – Verify that all admin accounts are legitimate. Delete any you don’t recognize.

If you find malicious code, remove it carefully or replace the affected content with clean versions from a known backup.

Always export your database before editing anything. That way, if you delete the wrong row or table, you can easily roll back to the previous version.

6. Reset all passwords and user roles

Now that your site is clean, the next step is to secure every access point. Think of it as changing all the locks after a break-in.

Start with your WordPress admin account, create a brand new, strong password that you’ve never used before. Then reset passwords for every user with admin or editor access. If you see accounts you don’t recognize, delete them right away.

Next, move beyond WordPress. Update your hosting panel, FTP/SFTP, and database passwords, too. Many hackers plant backdoors through server access, not just the dashboard.

If your site connects to third-party tools like email marketing services or payment gateways, regenerate API keys and tokens there as well.

Once all passwords are reset, turn on two-factor authentication (2FA) for extra protection. It’s a small setup that makes a massive difference.

Sidenote: Encourage your team to use a password manager like Bitwarden or 1Password. It keeps credentials unique, strong, and safe, no sticky notes required.

7. Reinstall core files, themes, and plugins

You’ve cleaned the infection, now it’s time to rebuild your site’s foundation with fresh files. This step ensures no hidden issues remain inside outdated or modified code.

  • Start by downloading a clean copy of WordPress from wordpress.org.
  • Then, using your hosting file manager or FTP, delete the /wp-admin/ and /wp-includes/ folders from your site.
  • Once removed, upload the fresh versions from the new WordPress package.

Next, reinstall every plugin and theme directly from official sources, either WordPress.org or the developer’s verified site. Avoid copying old plugin folders from your previous installation; they might contain infected files.

After reinstalling, reactivate your plugins one by one to make sure nothing breaks or reintroduces issues.

Here is a quick check:

  • Don’t overwrite your wp-config.php file; it contains your database credentials.
  • Don’t delete /wp-content/uploads/ That’s where your media files live.

Finally, run another quick malware scan to confirm everything’s clean.

8. Restore from a clean backup (if available)

If you’ve been keeping backups, this is your moment to implement. A clean backup can save you hours of manual cleanup by rolling your website back.

Therefore, you can start by checking the available backups. Look for one created before the first sign of infection (for example, before your site showed strange redirects or spam pages). If you’re unsure of the exact date, choose the oldest backup that still contains your full content and functionality.

You can restore in two ways:

  • Using your hosting provider’s backup tool: Most managed hosts let you restore with one click from the dashboard.
  • Using a plugin like BlogVault or UpdraftPlus: Upload your clean backup and let the tool handle the restoration.

Once the site is restored, scan it immediately with Wordfence or Sucuri to confirm that the backup itself isn’t infected.

? If everything checks out, congratulations — you’ve just brought your site back from the dead.

Important tip: After restoring, update your WordPress core, themes, and plugins right away to patch any vulnerabilities that caused the hack in the first place.

9. Test everything before going live

Your website’s clean, but don’t flip the switch just yet. Before you bring it back online, you need to make sure everything works exactly as it should.

Start by visiting your site in a private/incognito window. Click through your homepage, blog, checkout pages, and forms. Look for broken layouts, missing images, or links that don’t work.

Next, run another malware scan using Wordfence, Sucuri, or your host’s security tool. It’s your last line of confirmation that no infected code or hidden redirect is still lurking around.

Then, test all the essentials:

  • Log in and log out
  • Contact or booking forms
  • Payment gateways
  • Plugins that handle user data

Everything should feel normal, fast, clean, and safe.

Once you’re confident, disable maintenance mode and make the site public again.

To wrap up, take a fresh, clean backup of this version. Store it somewhere secure — it’s your new baseline for safety.

Finally, head to Google Search Console → Security Issues, and if your site was flagged before, request a review for malware removal.

? Remember one thing: due to these incidents, your site may lose potential traffic, but we have a detailed guide about it. You should check and apply the vital steps for your newly created WordPress site.

? Fix Traffic Drop Caused by Google AI Overview

Keep monitoring your site over the next few weeks. Set up uptime alerts, enable daily backups, and schedule weekly scans. Prevention is easier and cheaper than fixing a hack twice.

Build a shield and prevent your WordPress site from being hacked

Well, you have now the steps — here are the short tips to keep your site safe and prevent future hacks.

1
Update core, themes, and plugins regularly. Turn on auto-updates for trusted tools, and remove what you don’t use.
2
Enable 2FA and use strong passwords. Unique, long passwords + two-factor for every admin account.
3
Use SSL and secure hosting. Force HTTPS everywhere and choose a host with isolation, backups, and security scans.
4
Limit login attempts. Add rate-limiting or CAPTCHA to block brute-force bots on wp-login.php and XML-RPC.
5
Disable file editing and PHP in uploads. Lock file permissions and block PHP execution inside /wp-content/uploads/.
6
Install a Web Application Firewall. Use Cloudflare or Sucuri to filter attacks before they reach your server.
7
Schedule backups and monitoring. Daily off-site backups + weekly scans and uptime alerts to catch issues early.

Frequently asked questions regarding the hacked WordPress website

What should I do first if my WordPress site is hacked?

Put the site in maintenance mode, take a full backup, and contact your hosting provider. Do not delete files before you scan and save a copy.

Can I fix a hacked WordPress website without coding?

Yes, you can fix many hacked WordPress sites with tools like Wordfence, Sucuri, MalCare, hosting malware scanners, and backup plugins. If the infection keeps coming back, hire a security expert.

Why does my WordPress site keep getting hacked?

Repeated hacks usually happen because of hidden backdoors, outdated plugins, weak passwords, nulled themes, or infected database entries that were not cleaned properly.

How do I remove malware from WordPress?

Scan your site, identify infected files, replace modified core files, remove suspicious code, clean the database, delete unknown users, reset passwords, and run a second scan.

How do I remove Google’s hacked site warning?

Clean the site first, verify it with malware scanners, then go to Google Search Console → Security Issues and request a review. Explain the cleanup steps you completed.

Should I restore a backup if my WordPress site is hacked?

Yes, but only restore a backup from before the infection. After restoring, update everything and scan again because old backups can still contain vulnerable plugins or hidden malware.

How can I prevent WordPress hacks in the future?

Use strong passwords, enable two-factor authentication, update plugins and themes, remove unused tools, block PHP execution in uploads, use a firewall, and keep daily off-site backups.

How do I know if my WordPress site is still infected after cleanup?

Run two different malware scanners, for example, Wordfence and Sucuri SiteCheck, and also check your server logs for suspicious activity. If your files stop changing unexpectedly and there are no strange admin accounts, you’re likely clean. Re-scan after 24 hours to confirm.

What should I do if Google marks my site as “Deceptive” or “Hacked”?

After cleaning your site and verifying with scanners, log into Google Search Console → Security Issues, request a review, and explain what steps you took. Once Google confirms the site is safe, the warning disappears within a few days.

Can AI-powered bots really hack WordPress sites?

Yes. Modern bots now use AI to identify vulnerable plugins, guess passwords more intelligently, and bypass standard firewalls. That’s why using 2FA, CAPTCHA, and real-time WAFs is more critical than ever.

So, are you safeguarding your WordPress site from hackers?

A hacked WordPress website is serious, but you can recover it safely if you follow the right order: contain the site, back it up, scan for malware, clean infected files and database entries, reset access, update everything, and verify the cleanup.

Once your site is clean, do not stop there. Add two-factor authentication, daily off-site backups, malware monitoring, login protection, and a web application firewall. Most WordPress hacks happen because of outdated plugins, weak access, or missed security basics. Fix those gaps now so the same problem does not return.

If your site handles orders, bookings, event registrations, or customer data, treat security as part of your business growth. A safe site protects your traffic, your customers, and your revenue.

Want to take it a step further?
Once your site is secure, make it lightning-fast too. A fast website improves SEO, boosts conversions, and keeps users happy — it’s the perfect next move for your WordPress growth.

? Speed Up Your WordPress Site

Written By

Editor

Founder of Arraytics and ThemeWinter. He is a passionate and driven entrepreneur and tech leader who loves turning creative ideas into powerful digital products that make people's lives easier. He is deeply involved in building solutions within the WordPress ecosystem, crafting SaaS, plugins, and themes that are trusted and used by thousands of businesses and developers around the world. His ultimate professional goal is to combine technology and innovation to create products that empower people, support growing businesses, and contribute to the broader digital economy.

Looking for fresh content?

Get articles and insights from our weekly newsletter.