BLACK FRIDAY: 50% OFF all Pro plans Code: BLACKFRIDAY50
Pro from $10 a year or $30 lifetime, no code needed: Code: BLACKFRIDAY50
Ends Cyber Monday, 30 Nov. Lock in the price today. Code: BLACKFRIDAY50
Get 50% Off

Hacked WordPress Site? 9 Steps to Clean It and Lock It Down in 2026

Spam links, strange redirects or a Google warning? Here is a calm, step by step plan to clean a hacked WordPress site and stop it happening again.
Red padlock on a black keyboard, a symbol of fixing a hacked WordPress site

You open your website and something is wrong. Visitors land on a casino page, Google shows a red warning, or your host has suspended your account. A hacked WordPress site feels scary, but it is almost always fixable if you work calmly and in the right order.

This guide walks you through 9 clear steps: how to confirm the hack, clean it properly, get your Elementor pages back and make sure it does not happen again. You do not need to be a developer. You do need about two to four hours and a little patience.

Why WordPress sites get hacked in the first place

WordPress itself is rarely the weak spot. According to Patchstack’s State of WordPress Security in 2026 report, 11,334 new vulnerabilities were found in the WordPress ecosystem in 2025, up 42% from the year before. Plugins made up 91% of them and themes 9%. WordPress core had only 6, all low priority.

Two more numbers explain why speed matters. For the most targeted bugs, the median time to mass exploitation was about 5 hours after disclosure. And 46% of vulnerabilities had no fix from the developer when they went public. In plain words: outdated or abandoned plugins are the front door most attackers use.

Signs of a hacked WordPress site

Not every glitch is a hack. Look for one or more of these:

  • Visitors (often only on mobile, or only from Google) get redirected to spam, adult or scam sites
  • Google Search shows “This site may be hacked” or Chrome shows a red warning screen
  • Strange pages in Google results, often in Japanese or full of pharmacy keywords
  • New admin users you did not create
  • Unknown files in your root folder or in /wp-content/uploads/, especially .php files
  • Your host emails you about malware or suspends the account
  • The site suddenly slows down or sends spam emails

If you see any of these, treat it as a hack and start the steps below.

Green code on a dark screen, showing hidden malware on a WordPress site

Step 1: Stay calm and put the site in maintenance mode

Panic leads to deleting the wrong things. First, protect your visitors. Turn on a simple maintenance page (Elementor has a built in Maintenance Mode setting) or ask your host to restrict public access while you work. If you cannot log in at all, ask your host to do it for you.

Step 2: Take a backup of the hacked site

This sounds strange, but it matters. Download a full copy of your files and database as they are now, before you change anything. If a cleanup step breaks something, you can go back. It also helps a security expert if you later need one. Label it clearly, for example “infected-backup-do-not-restore”.

Step 3: Change every password

Assume all passwords are known to the attacker. Change them in this order:

  1. Hosting control panel and email for the domain
  2. SFTP or FTP and SSH accounts
  3. Database password (then update it in wp-config.php)
  4. Every WordPress administrator account

Turn on two factor authentication anywhere it is offered, starting with your hosting account.

Step 4: Scan the site to find what is infected

Run a scan with a trusted security plugin or the malware scanner your host provides. Many hosts now include one for free. Also check Google Search Console under Security and Manual Actions > Security issues. Google lists the exact problem and sample URLs.

Write down every infected file and URL the tools report. That list is your cleanup map.

Step 5: Replace WordPress core, plugins and themes with clean copies

Instead of hunting through thousands of files, replace them with fresh ones:

  • WordPress core: download a fresh copy from WordPress.org and replace the wp-admin and wp-includes folders. Keep wp-config.php and wp-content.
  • Plugins: delete each plugin folder and reinstall it from the official source. Delete any plugin you no longer use.
  • Themes: reinstall your theme from its official source. Remove unused themes, but keep one default theme as a fallback.

Your Elementor pages are safe during this step. Elementor stores your page designs in the database, not in plugin files, so reinstalling Elementor or any addon plugin does not delete your layouts.

Monitor showing WordPress theme code being checked for malware

Step 6: Clean the uploads folder and the database

The /wp-content/uploads/ folder should hold images, PDFs and similar media. It should almost never contain .php files. Delete any you find there unless you know exactly what they are.

In the database, check these places:

Where to look What to look for
Users Admin accounts you did not create (delete them)
wp_options Strange values in siteurl, home or active_plugins
Posts and pages Hidden links or script tags added to content
Elementor templates Unknown templates or code in HTML and Custom Code widgets

Also review your .htaccess file. Hackers love to add redirect rules there. If in doubt, regenerate it by saving Settings > Permalinks.

Step 7: Reset security keys and log everyone out

WordPress uses secret keys and salts in wp-config.php to secure logins. Replace them with new ones from the official WordPress.org secret key generator. This instantly logs out every user, including an attacker who still has an active session.

Step 8: Ask Google to review your site

Once the site is fully clean, go back to the Security issues report in Search Console and request a review. Google advises you to clean the whole site, not just the sample URLs, and to explain what happened and what you fixed. A review can take from a few days to a few weeks, and sending repeat requests while one is pending can slow things down.

If your host suspended the account, contact them with the same summary so they can lift it.

Step 9: Lock it down so it does not happen again

Cleaning is half the job. Hardening is the other half:

  • Update weekly. Turn on auto updates for trusted plugins and check the rest once a week.
  • Use fewer plugins. Every plugin is extra code to keep safe. Remove anything you do not actively use.
  • Choose maintained plugins. Check the “last updated” date and support forum before you install.
  • Add a firewall. A web application firewall or virtual patching service blocks attacks on known bugs before you can update.
  • Disable the file editor. Add define('DISALLOW_FILE_EDIT', true); to wp-config.php so nobody can edit code from the dashboard.
  • Keep automatic off site backups. Daily backups stored away from your server turn the next problem into a 10 minute restore.
  • Limit admin accounts. Give people the lowest role they need, such as Editor instead of Administrator.

Golden padlock on a white keyboard for WordPress security hardening

Fewer plugins, fewer doors

Many Elementor sites run five or six separate addon plugins just to get a pricing table here and a slider there. Each one is a separate update, a separate developer and a separate risk. Bringing those widgets under one well maintained plugin is one of the easiest security wins you can make.

That is a big reason we built Bright Addons as one lightweight plugin. The free version gives you 40 Elementor widgets at no cost, and Pro adds 80 extra widgets and 10 extensions in the same package. You can browse all widgets, read the setup docs or compare plans starting from $10 a year.

Frequently asked questions

How do I know if my WordPress site is hacked? Common signs are redirects to spam sites, a Google or Chrome warning, unknown admin users, strange pages in search results and unfamiliar .php files in your uploads folder. A security scan and the Security issues report in Google Search Console will confirm it.

Can I fix a hacked WordPress site myself? Yes, in most cases. If you follow a clear order (back up, change passwords, scan, replace core and plugins, clean the database, reset keys), many site owners can clean a simple infection in a few hours. If the hack keeps coming back, hire a security professional.

Will reinstalling Elementor delete my pages? No. Elementor saves your designs in the WordPress database. Deleting and reinstalling the plugin files does not remove your pages or templates, though you should always back up first.

How long does it take Google to remove the hacked warning? After you request a review in Search Console, Google says it can take from a few days to a few weeks. Make sure the whole site is clean before you ask, because a failed review adds more waiting.

Conclusion

A hacked WordPress site is stressful, but it is not the end of your website. Back up first, change every password, replace infected files with clean copies, clean the database, reset your keys and then ask Google for a review. After that, keep plugins few and updated, add a firewall and run daily backups.

Bookmark this checklist now, while your site is healthy. The best time to plan for a hack is before it happens.

Share this post

Keep reading