Skip to main content

A to Z Website Solutions

WordPress Troubleshooting

What Should I Do If My WordPress Website Has Been Hacked?

By Nov 08, 2026 20 min read
What to Do If Your WordPress Website Has Been Hacked

What Should I Do If My WordPress Website Has Been Hacked?

Discovering that someone may have hacked your business website is a horrible feeling. You might open your homepage and find strange messages, discover pages you never created or receive an email warning that your website contains harmful software. Perhaps customers have contacted you because your website is sending them somewhere completely different.

For a small business, this is more than an irritating technical problem. Your website might be responsible for customer enquiries, appointment bookings, online sales or simply reassuring people that your business is genuine. When something goes wrong, you naturally want to get everything working again as quickly as possible.

However, rushing to delete files, reinstall WordPress or restore an old backup without understanding the problem can make recovery harder. The first priority is to protect your website, your customers and any information that may have been affected.

Quick Answer

If your WordPress website has been hacked, contact your hosting provider immediately and ask them to help contain the attack. If you can still access your accounts safely, secure them using a trusted device, change compromised passwords and enable two-factor authentication where available.

Preserve a copy of the affected website and relevant records before attempting major repairs. Have the website checked for malicious files, unauthorised users and changes to its database. Once the cause has been identified and removed, restore clean files or a verified backup, update the software and test everything carefully.

If customer information may have been exposed, assess whether you need to report a personal data breach to the Information Commissioner’s Office (ICO). Don’t assume the website is safe simply because the homepage looks normal again.

How Can I Tell If My WordPress Website Has Been Hacked?

A hacked WordPress website doesn’t always display an obvious warning. Some attacks are designed to remain hidden while criminals use the website to send spam, redirect visitors or gain access to information.

Other attacks are much easier to spot. You might find that your homepage has been replaced, unfamiliar advertisements have appeared or your website suddenly redirects customers to another address.

Possible warning signs include:

  • Unknown administrator accounts appearing in WordPress.
  • Pages or blog posts you didn’t create.
  • Visitors being redirected to suspicious websites.
  • Unusual links, advertisements or spam appearing on pages.
  • Security warnings from Google or your hosting provider.
  • Unexpected changes to website files or settings.
  • Large numbers of unwanted emails being sent from your website.
  • Customers reporting suspicious behaviour or harmful downloads.
  • Being locked out of your WordPress administrator account.

These signs deserve investigation, but they don’t always prove that someone has hacked your website. A faulty plugin, incorrect redirect setting or hosting problem can sometimes produce similar symptoms.

The official WordPress guidance for hacked websites recommends identifying and documenting the symptoms before beginning recovery. This helps establish what happened and gives anyone assisting you a clearer picture of the problem.

What to Do Immediately If Your WordPress Website Has Been Hacked

If you believe your website has been compromised, the first task is to stop the situation getting worse. You don’t need to understand every technical detail before taking sensible protective action.

1. Record What You Have Discovered

Make a note of when you first noticed the problem and what appeared unusual. Save screenshots of unexpected pages, warnings and suspicious messages. Keep copies of relevant emails from your hosting provider or security services.

These details can help a website professional identify the attack. They may also be useful if customer information has been affected or you need to explain what happened to an insurer or regulator.

2. Prevent Further Harm to Visitors

If your website is redirecting customers to dangerous pages, distributing malicious downloads or collecting information through a suspicious form, ask your hosting provider to restrict public access while the problem is investigated.

Depending on the circumstances, this could mean temporarily taking the affected website offline, blocking suspicious traffic or using a safe maintenance page. A normal WordPress maintenance plugin may not be sufficient if an attacker still controls the website.

3. Keep Business Communication Working

If your website is temporarily unavailable, customers still need a way to contact you. Consider updating your Google Business Profile, social media pages or other trusted business channels with your normal telephone number or alternative contact details.

For example, a local garage could continue accepting bookings by telephone while its website is being repaired. The important thing is to keep customers informed without sending them back to an unsafe website.

Contact Your Hosting Provider

Your website hosting provider should be one of your first contacts after discovering a suspected attack. The hosting company may be able to restrict access, preserve useful records, identify suspicious activity or explain whether other websites on the server have been affected.

Contact the provider using its official website or support details rather than following links in unexpected emails. Explain that you suspect your WordPress website has been compromised and request urgent security assistance.

What Should You Ask Your Hosting Provider?

Ask whether the hosting company can preserve server logs, create a copy of the affected website and check for malicious files or unauthorised access. Find out whether clean backups are available and how far back they go.

You should also ask whether the attack may have affected email accounts, other websites on the hosting account or access to the hosting control panel.

The UK’s National Cyber Security Centre recommends involving relevant IT providers when resolving a cyber incident. This is particularly helpful for small businesses that don’t manage their own servers.

Secure Your Passwords and Website Accounts

Changing passwords is an important part of recovering from a hacked website, but WordPress isn’t necessarily the only account you need to protect. An attacker may have gained access through a stolen password, compromised email account or hosting login.

Use a device you believe is safe and begin securing important accounts. If you suspect your computer is infected, have it checked before using it to access the website again.

Which Passwords Should You Change?

  • WordPress administrator passwords.
  • Hosting account and cPanel passwords.
  • FTP or SFTP account passwords.
  • Relevant database credentials, with professional assistance.
  • Email accounts used to manage the website.
  • Other accounts using the same or potentially exposed passwords.

Make sure each account has a strong, unique password. Where available, enable two-factor authentication, which requires an additional form of verification when signing in.

Check WordPress administrator accounts for unfamiliar users. Also review your business email account for suspicious forwarding rules or recovery settings. Criminals can sometimes use a compromised email account to regain access even after website passwords have been changed.

A website professional may also need to invalidate existing WordPress login sessions by rotating the site’s security keys. Once the website has been cleaned and secured, change relevant credentials again if they could have been exposed during the incident.

Preserve Evidence and Back Up the Website

It may sound strange to back up a website that has already been hacked, but preserving the affected version can be useful. The files, database and server records may contain clues about what happened and how the attacker gained access.

Ask your hosting provider or security professional to preserve a copy before making major changes, where this can be done safely. Keep this copy separate from your clean backups and don’t restore it directly to the live website.

Check Your Existing Backups

Find out when your most recent backups were created and whether they include both the website files and database. If your website has an online shop or booking system, you also need to consider information added since the last backup.

A backup created yesterday isn’t automatically safe. If an attacker entered the website several weeks ago, the backup may already contain malicious files or unauthorised accounts.

This is why a backup should be checked before being used for recovery. Restoring an infected copy can bring the original problem straight back.

How to Remove Malware From a Hacked WordPress Website

Removing malware means identifying and removing harmful software, unauthorised changes and any access that the attacker left behind. This can involve much more than deleting a suspicious plugin or replacing the homepage.

Malicious code may be hidden in WordPress files, themes, plugins, uploaded files or the database. Some attackers also create additional administrator accounts or hidden ways to regain access later.

Scan the Website for Suspicious Files

A reputable WordPress security scanner can help identify known malware patterns, altered files and other warning signs. Your hosting provider may also offer server-level scanning.

However, a scanner isn’t a guarantee that every infection will be found. Some threats require manual investigation, particularly when the attacker has modified legitimate files or created hidden access points.

Replace Compromised Software With Clean Copies

A professional may need to replace WordPress core files, themes and plugins with trusted copies from their original sources. They should also inspect the database, uploads directory, configuration files and scheduled tasks for suspicious changes.

Simply reinstalling WordPress through the dashboard may not remove additional malicious files that an attacker has created. The complete website environment needs to be considered.

Identify How the Attacker Got In

Removing the visible infection is only part of the job. You also need to find out whether the attack involved an outdated plugin, stolen login details, insecure hosting settings or another weakness.

If the original weakness remains, the attacker may be able to return. Where the entry point cannot be established with certainty, the recovery should include a wider security review and continued monitoring.

Can You Restore Your Website From a Backup?

Yes, restoring a verified clean backup can be an effective way to recover a hacked WordPress website. However, the backup must be checked, and the weakness that allowed the attack must also be addressed.

For example, imagine a beauty salon’s website is hacked on a Friday, but the last confirmed clean backup was created on Monday. Restoring that backup might recover the website’s pages and design, but appointment enquiries and changes made during the week could be missing.

Before restoring, work out what information may have changed since the backup was created. For websites taking orders or bookings, a professional may need to recover legitimate newer records separately rather than overwriting everything.

After restoration, update vulnerable software, secure accounts and test the website carefully. Check contact forms, booking systems, payment arrangements and any important business features before allowing customers to use the website normally again.

What If Customer Information Has Been Stolen?

If your website collects customer names, email addresses, telephone numbers, booking details or other personal information, a security incident may also be a personal data breach.

Not every hacked website results in stolen customer information. However, you shouldn’t assume that data is safe simply because there is no obvious evidence of theft. The incident needs to be assessed based on what information was stored, what access the attacker obtained and what records are available.

Do You Need to Report the Breach to the ICO?

Under UK GDPR, certain personal data breaches must be reported to the Information Commissioner’s Office without undue delay and, where feasible, within 72 hours of becoming aware of the breach. The reporting requirement depends on the risk to people’s rights and freedoms, rather than whether the website was hacked.

If the breach is likely to create a high risk to affected individuals, you may also need to inform those people without undue delay. Organisations must keep records of personal data breaches, including those that don’t require notification.

The ICO provides guidance for small businesses responding to a personal data breach. If you’re unsure whether an incident is reportable, seek advice promptly rather than waiting until every technical detail has been established.

Important: Don’t Ignore Possible Customer Data Exposure

If personal information may have been accessed, begin assessing the breach immediately. Keep records of what happened, what information may be involved and what steps you’ve taken. A reportable breach normally has a 72-hour notification deadline, where feasible, from the point you become aware of it.

Do not delay the assessment simply because the website is still being repaired. You can provide further information to the ICO as the investigation develops.

What If Google Warns Visitors About Your Website?

Google may display warnings when it detects harmful software, deceptive content or other security problems on a website. In some cases, the website may also contain spam pages that appear in search results without the owner’s knowledge.

If your website has been affected, check the Security Issues report in Google Search Console. This can provide information about problems Google has detected.

Once the website has been properly cleaned and the security problems have been resolved, follow the relevant review process in Search Console where one is available. Don’t request a review while the website still contains harmful content or unresolved security weaknesses.

Warnings may take time to disappear after a successful review. Removing malware also doesn’t guarantee that lost search visibility will return immediately, particularly if unwanted pages or redirects have affected the website for some time.

How to Reduce the Risk of Being Hacked Again

No website can be guaranteed completely safe from every attack. However, sensible security measures can reduce the likelihood of common problems and make recovery easier if something does go wrong.

Keep WordPress, Themes and Plugins Updated

Updates often include security fixes as well as new features. Make sure WordPress, your theme and installed plugins are maintained and supported. Remove software that is no longer needed, and replace abandoned plugins when a suitable alternative is available.

Before major updates, confirm that a recent backup exists and check compatibility with important website features.

Use Strong Access Controls

Give people only the access they need. Someone writing occasional blog posts doesn’t normally need full administrator permissions. Remove old accounts belonging to previous employees, contractors or website developers when access is no longer required.

Use unique passwords and two-factor authentication wherever possible. Review who has access to your hosting account as well as WordPress itself.

Arrange Reliable Backups

Backups should include the website files and database, be stored securely and be available even if the hosting account is compromised. Keep more than one recovery point where practical and periodically test whether a backup can be restored.

A busy online shop may need more frequent backups than a simple brochure website. The right schedule depends on how much information changes and how much data your business could afford to lose.

Review Hosting and Website Maintenance

Choose hosting that provides appropriate security, supported software and reliable assistance when problems occur. Regular website maintenance should also include checking updates, access permissions, backups and unusual activity.

If keeping up with these tasks is difficult, our WordPress maintenance service is one option for ongoing support with website updates, security and stability.

Common Mistakes to Avoid During Recovery

When a website has been hacked, it’s understandable to want the problem fixed immediately. However, certain shortcuts can make recovery more difficult or leave the business exposed to another attack.

Common mistakeWhy it can cause problemsBetter approach
Deleting suspicious files immediatelyMay remove evidence or damage legitimate website features.Preserve a copy and investigate before cleaning.
Restoring the newest backup without checking itThe backup may already contain malware.Verify the recovery point and address the original weakness.
Changing only the WordPress passwordOther accounts may still be compromised.Secure hosting, email and other relevant access points.
Assuming a clean homepage means the attack is overHidden files, accounts or database changes may remain.Complete a wider security investigation.
Ignoring customer informationCould leave affected people unprotected and create legal problems.Assess the data breach and any reporting duties promptly.

Another mistake is assuming that installing a security plugin after an attack will automatically remove every problem. Security tools can help, but they are only one part of a proper investigation and recovery process.

Expert Insight From Daren Ward

Daren Ward, Founder of A to Z Website Solutions
Daren Ward

Having worked with WordPress and business websites for many years, my advice is to treat a suspected hack as more than a website repair job. Getting the homepage working again is important, but it doesn’t tell you whether the website is genuinely safe.

I’d want to know how someone gained access, whether any unfamiliar accounts have been created and whether the website’s files or database have been changed. I’d also want to understand what information the business collects and whether the incident could have affected its customers.

One practical point I would emphasise is the importance of keeping your hosting and WordPress access details under your own control. Business owners sometimes rely entirely on a previous developer for access to their website. That can create unnecessary delays when urgent action is needed.

My recommendation is to make sure you know who hosts your website, who has administrator access and where your backups are stored before a problem occurs. If an attack does happen, those simple details can make the recovery process much easier to manage.

Hacked WordPress Website Action Checklist

  • Record the suspicious behaviour and when you first noticed it.
  • Contact your hosting provider through its official support channel.
  • Ask the host to contain the incident and preserve relevant logs.
  • Restrict public access if visitors may be exposed to harmful content.
  • Secure important accounts using a trusted device.
  • Check WordPress users and business email accounts for suspicious changes.
  • Preserve a copy of the affected website and review available backups.
  • Arrange a malware investigation and identify the likely entry point.
  • Restore verified clean files or a suitable backup, then secure the website.
  • Assess whether customer information may have been affected.
  • Check whether an ICO notification or customer communication is required.
  • Test the restored website and arrange continued security monitoring.

Frequently Asked Questions

1. Can a hacked WordPress website be recovered?

Yes, many hacked WordPress websites can be recovered by removing malicious files, securing accounts and restoring clean website content. The difficulty depends on the extent of the attack, the availability of backups and whether the original weakness can be identified. More serious incidents may require rebuilding parts of the website.

2. How long does it take to fix a hacked WordPress website?

Recovery time varies considerably. A straightforward incident with a clean backup may be resolved relatively quickly, while an attack involving hidden malware, compromised hosting or stolen customer information can take much longer. The priority should be safe recovery rather than putting the website online before the problem has been properly addressed.

3. Can someone hack my WordPress website without knowing my password?

Yes. Attackers may exploit weaknesses in outdated software, insecure plugins, themes or server settings without knowing your WordPress password. Stolen passwords are only one possible entry point. This is why software updates, secure hosting and sensible access controls all matter.

4. What should I do if I cannot log into my hacked WordPress website?

Contact your hosting provider and explain that you may have lost administrator access following a security incident. The provider or a trusted website professional may be able to help you regain control safely. Avoid repeatedly changing database settings yourself unless you understand the process, as incorrect changes can cause further problems.

5. Will restoring a backup remove the hack?

Restoring a verified clean backup can remove malicious changes made after that backup was created. However, it won’t necessarily solve the problem if the backup is already infected or the original security weakness remains. Recovery should include securing accounts, checking the website environment and addressing the likely cause of the attack.

6. Should I delete my WordPress website and start again?

Not automatically. Completely rebuilding a website may be appropriate after a serious compromise, but many incidents can be resolved without losing all your existing content and design. A professional assessment can help determine whether cleaning, restoring or rebuilding is the safest and most practical option.

7. Can hackers steal customer details from a WordPress website?

Yes, depending on what information the website stores and what access the attacker obtains. Customer names, email addresses, booking information and other personal details may be at risk. If a breach is suspected, assess the available evidence and consider your responsibilities under UK data protection law.

8. Do I have to tell customers that my website has been hacked?

Not every website hack creates a legal duty to notify customers. However, if a personal data breach is likely to result in a high risk to individuals’ rights and freedoms, UK GDPR requires affected people to be informed without undue delay. You may also choose to communicate relevant safety information in other circumstances.

9. Will a security plugin stop my WordPress website being hacked again?

A reputable security plugin can provide useful protection and monitoring, but it cannot guarantee that your website will never be compromised. Good security also depends on software updates, account permissions, hosting, backups and how people manage their login details. Avoid relying on one plugin as your entire security strategy.

10. Can a hacked website affect my business emails?

Yes, depending on the type of attack and how your email and hosting services are configured. Criminals may abuse a website to send spam or gain access to related accounts. Ask your hosting provider to check for suspicious email activity and review account security, including forwarding rules and passwords.

Summary

Discovering that your WordPress website has been hacked is worrying, especially when your business relies on it for customer enquiries, bookings or sales. However, the most important thing is to respond carefully rather than rushing into changes that could make the situation worse.

Start by contacting your hosting provider, securing your accounts and preserving useful evidence. Then arrange a proper investigation, remove malicious changes and restore the website from trusted files or a verified clean backup. Make sure the original weakness is addressed before returning the website to normal operation.

If customer information may have been affected, assess your data protection responsibilities promptly. Once the website is secure, regular updates, reliable backups and sensible access controls can help reduce the risk of another incident.

Getting Further Help

If you suspect your WordPress website has been hacked and aren’t confident making technical changes, contact your hosting provider and seek qualified security assistance promptly. Once the immediate incident has been resolved, you can explore our WordPress maintenance service for ongoing help with website security, updates and stability.

The aim is to get your website working safely again while protecting the customers who rely on your business.

Key Takeaways

  • Contact your hosting provider as soon as you suspect an attack.
  • Protect visitors from potentially harmful website content.
  • Secure WordPress, hosting and email accounts.
  • Preserve evidence before making major changes.
  • Check backups carefully before restoring them.
  • Remove malicious files and investigate how the attacker gained access.
  • Assess whether customer information has been compromised.
  • Follow ICO reporting requirements where applicable.
  • Keep WordPress updated and maintain reliable backups.
  • Don’t assume the website is secure just because it looks normal.

Found This Helpful? Share It

If you found this article useful, please share it with other business owners who might find it helpful too.

A quick share on LinkedIn, Facebook or your favourite social platform could help someone else find the advice they need.

Client Login