Hacked WordPress site recovery starts with containment: take the site offline, change every password, back up everything and scan for malware before you delete a single file.

Quick answer: Contain the site, change passwords, take a full backup, find and remove the malware, then harden logins, plugins and updates so it does not happen again.

Hacked WordPress site recovery starts with containment: take the site offline, change every password, back up everything, and scan for malware before you touch a single file. The order matters more than the speed. Most owners who make the damage worse do it by deleting things first and asking questions later, which wipes the evidence you need to find the entry point and close it. If your phone is ringing with a warning from your host or a customer, take a breath and work the steps in sequence.

The guidance below follows the standard recovery sequence used across WordPress security resources: contain the damage, find where the malware is hiding, decide whether to clean it yourself or bring in help, then harden the site so the same hole does not get used twice. Nothing here requires you to be a developer, but some of it does require patience.

Step 1: Contain the damage during hacked WordPress site recovery

Containment is about stopping the bleeding while you still have a working copy of the scene. Skip this and every later step gets harder, because the attacker may still have an open door, and your own cleanup work will overwrite the clues.

Take the site offline

Putting the site into maintenance mode or taking it down through your hosting control panel stops visitors from being exposed to injected pages, spam redirects, or malicious downloads. It also stops search engines and scanners from recrawling a compromised version of the page. Keep access to the WordPress admin and to your hosting account while you do this, because you will need both. Do not delete the site, and do not wipe the hosting account. An offline site can be recovered. A deleted site has to be rebuilt.

Change every password that touches the site

Change the WordPress admin passwords, then keep going. That means your hosting control panel, any FTP or SFTP accounts, your database user, and any email accounts tied to the domain. Look at the user list inside WordPress and remove or demote accounts you do not recognize, then force all logged in sessions to sign out so nobody stays connected on an old session. Use unique passwords for each account. If you have been reusing the same password across your site, your email, and your bank, change those too, because reused credentials are one of the ways a single leak turns into a full takeover.

Back up everything before you touch anything

Take a complete backup of both the files and the database and store it somewhere off the server. This is not the backup you restore from. It is the reference copy you compare against later, and the safety net if a cleanup step goes wrong. When you do get to the restore stage, remember the rule that catches people out: a backup made after the infection is not a clean backup. Roll back to a copy you know predates the hack, or clean the current site properly.

Step 2: Find where the malware is hiding

Malware on WordPress rarely sits in one obvious file. It turns up in plugin and theme files, in the uploads folder, in core WordPress files that have been modified, and in the database itself through injected posts, widgets, or options. A free scan is a reasonable first pass. Sucuri offers a public site check tool at www.sitecheck.sucuri.net that scans a website for malware and spam and gives you a starting read on what is showing up publicly. Use it to understand what the outside world sees, then go deeper on the server.

As you look through the install, work from a list rather than from instinct. Check for files with recent modification dates you cannot explain. Compare plugin and theme folders against fresh copies from the official source. Look for unfamiliar admin users and for scheduled tasks you did not create. Check the database for content you never published, including posts, pages, and widget text injected with links. Write down what you find. That record tells you whether the cleanup worked, and it tells a security professional exactly where to start if you hand the job over.

Clean it yourself or hire a security expert?

This is the decision point most owners underestimate. Cleaning a hacked WordPress site is a technical job with a clear finish line, and it is entirely doable on a small, simple site with an obvious infection and a good clean backup. It is a much harder call on a business site that takes leads, has customer data, or shows signs of a persistent backdoor.

Situation Realistic path
Small site, one clear infection, clean backup available Clean it yourself using the steps above, then harden
Site is offline and losing enquiries every day Bring in help early, since speed protects revenue
Malware returns after cleanup Get help, because a backdoor is still open somewhere
Customer data, orders, or logins are involved Get help and follow your host's guidance on notification

If you do it yourself, the cleanup follows a pattern. Remove the malicious code you identified, replace core WordPress files, themes, and plugins with fresh copies from official sources, and delete anything you are not using. Unused plugins and themes are dead weight that still has to be patched, and abandoned ones are a common way back in. Then rescan, and rescan again after a few days.

If the site keeps getting reinfected, stop repeating the same cleanup. Something is still there, whether it is a hidden admin account, a modified core file, or a scheduled task that rebuilds the payload. That is the point to bring in someone who does this regularly rather than losing another week.

Harden the site after hacked WordPress site recovery

Recovery is not finished when the warning disappears. The last phase is the one that decides whether you are back on the phone with your host in three months. Keep WordPress core, themes, and plugins updated, and remove anything you are not actively using. Run regular backups and store them somewhere other than the server, then test that a restore actually works. Limit admin access to the people who genuinely need it, and give everyone else the lowest role that lets them do their job. Keep an eye on user accounts and file changes so a future problem shows up early instead of arriving as a customer complaint.

Hosting belongs in that conversation. A managed environment with monitoring, patching, and backups handled for you removes a lot of the day to day risk that leads to a hacked WordPress site, and it means someone else is watching the server while you run the business. You can read about the managed secure WordPress hosting option we offer if you would rather not carry that load alone. The point is not to sell you a server. It is to make sure the next recovery story is not yours.

What to tell customers and staff while the site is down

Keep the message short and factual. Tell people the site is temporarily unavailable while you deal with a technical issue, give them a phone number or email so enquiries do not disappear, and set expectations for when normal service resumes without promising a time you cannot hit. Internally, brief anyone who handles inbound calls so they are not guessing. A hack is embarrassing, but silence and contradictory answers do more damage to trust than a plain statement that you are fixing it.

One more practical note: change the passwords on any other service that shared credentials with the site, including payment tools, email marketing, and analytics. Attackers who get into WordPress often find a way from there into whatever else the same login opens.

Frequently Asked Questions

How do I know if my WordPress site has been hacked?

Common signs include unfamiliar admin users, content you did not publish, unexpected redirects, warnings from a security scanner, or notices from your hosting provider. Sucuri's free site check tool at www.sitecheck.sucuri.net gives you a quick public read on malware and spam. A sudden drop in traffic or enquiries is also worth investigating, since injected spam can affect how your pages appear.

Will a hack hurt my search rankings?

It can. A site that is offline, serving spam pages, or redirecting visitors somewhere else is not giving search engines or customers anything useful to rank or trust. The recovery itself is usually the bigger issue, since every day offline is a day of lost enquiries. Get the site clean and back online, then watch your search visibility closely afterward.

Can I just restore a backup instead of cleaning the site?

Only if the backup was made before the infection started. Restoring a copy taken after the hack simply reinstalls the malware along with your content, and you will be back where you started within days. If you cannot confirm the backup is clean, clean the current site properly or bring in help before restoring anything.

How long does hacked WordPress site recovery take?

It depends on the size of the site, how deep the infection goes, and whether you have a clean backup. A small site with an obvious infection and a good backup can move quickly. A site with a hidden backdoor or injected database content takes longer, because the cleanup has to be verified before the site goes back online.

Should I delete the site and start over?

Rarely. A rebuild throws away your content, your page history, and the search visibility you have built, and it is often slower than cleaning what you already have. Starting over makes sense only when the damage is severe and no clean copy exists. Get a professional assessment before you make that call.