WordPress is one of the most widespread website platforms in the world, powering millions (43%) of sites on the internet. Unfortunately, its ubiquity also makes it a prime target for hackers, who are constantly looking for vulnerabilities to exploit.

While WordPress is generally considered to be a secure platform, the vast collection of themes and plugins available can often introduce vulnerabilities. It’s imperative to harden your site’s security and be prepared to deal with a compromised site.

In this article, we’ll explore what to do if you discover that your WordPress site has been compromised, and we’ll provide tips on how to prevent future security breaches.

Spotting a Compromised WordPress Site

There are a few telltale signs that your WordPress site may have been compromised. If you notice any of the following, it’s important to act quickly to address the issue:

  • Site is suddenly slow, unresponsive or inaccessible
  • Strange or unfamiliar files on your server
  • Site has been defaced with spam or inappropriate content (often invisible in white font)
  • Site has been flagged for malware or other security issues by hosting company

What to Do if Your WordPress Site Has Been Hacked

If you suspect that your site has been hacked, the first thing you should do is take it offline to prevent further damage. You can do this by putting your site into maintenance mode, which will display a temporary message to visitors while you work on restoring your site.

There are numerous ways to enable maintenance mode. SeedProd plugin is probably one of the easiest to deploy, especially in a hurry!

Next, you should try to determine the extent of the damage. This may involve reviewing your website’s files and database, and looking for any suspicious activity or changes. This feature is usually found within the cPanel and File Manager. Below is a screen shot from my hosting company of choice, GreenGeeks.

GreenGeeks cPanel

If you’re not comfortable doing this yourself, you may want to consider hiring a professional to help you. A shoutout to ZenBiz Services for running my WordPress sites; their team is a blast to work with.

Once you’ve identified the cause of the hack, you’ll need to take steps to remove any malicious code or files from your site. This may involve restoring your site from a backup, or manually cleaning up your site’s files and database.

It’s also important to update all of your WordPress plugins and themes to their latest versions, as outdated software can be a major vulnerability.

Additionally, you should change all of your site’s passwords, including your WordPress admin password, your hosting account password, and any other passwords associated with your site. Let’s face it. No Post-it Sticky Notes are large enough for all your passwords! A password manager like LastPass, DashLane or 1Password is a must nowadays.

Preventing Future Security Breaches

While dealing with a compromised WordPress site can be stressful and time-consuming, there are steps you can take to prevent future security breaches. Here are some tips to help harden your WordPress site’s security:

  • Keep your WordPress core, themes, and plugins up to date. Many of these updates can and should be automated
  • Use strong, unique passwords for all of your site’s accounts.
  • Install a website security plugin, such as Wordfence or Sucuri, to monitor for suspicious activity
  • Enable two-factor authentication for your WordPress admin account and other sensitive accounts
  • Choose a reputable hosting provider that offers robust security features
  • Backup your site regularly so that you can quickly restore it in case of a security breach
  • Consider implementing a Content Delivery Network (CDN), like Cloudflare
GreenGeeks cPanel

Jamstack as an Alternative

While WordPress is a popular choice for building websites, it’s not the only option. Jamstack is a new approach to web development that offers several benefits, including improved security. With Jamstack, websites are prebuilt and served as static files, eliminating the need for dynamic content management systems like WordPress.

Among all the Jamstack frameworks out there, I find Hugo quickest to learn and build. As a matter of fact, this very built is a Hugo site running on Netlify. What do you think of the site speed? For more advanced websites, Next.js may be a better framework, however.

Check out the thought process on moveing from WordPress to Hugo.


Discovering that your WordPress site has been hacked can be a frustrating and stressful experience. However, with the right steps and precautions, you can quickly restore your site’s security and prevent future breaches.

By keeping your WordPress site up to date, using strong passwords, and implementing additional security measures, you can help ensure that your site remains safe and secure. And, as always, stay tuned for more blog posts on the benefits of Jamstack architecture for website developement. Best of luck recovering your WordPress site.