Debug WordPress

Debug WordPress: 5 Ways to Fix a Hacked Site

WordPress is the most popular content management system in the world. Millions of websites are built on WordPress’s easy-to-use and feature-packed content management system. Unfortunately, this has also meant that WordPress websites are often the target of hackers who want to steal data and money or hold websites for ransom.

It is unsavory to hear, but most WordPress website hacks occur because of a lack of oversight and negligence about website security by the website owner or administrator. Here, we will tell you how to debug WordPress.  

Update your website password

If you suspect your website is compromised, immediately change your FTP and database passwords. Next, update the password in your wp.config file. It is a also good idea to run a virus scan on your computer to see if there is a keylogger on your computer because, otherwise, changing your password will be useless. Later, ensure that you choose a strong password.  

Inform your web host 

If you notice that your website has been compromised, you should first inform your web host. They will immediately run a scan, and if they find it compromised, they will tell you what to do. Depending on the severity of the hack, they may or may not restore your FTP access. Restoring FTP access will make it easier to fix things. Note that the web host may take your website offline until the problem is fixed (taking your website offline will protect your Google ranking, and your website visitors will also be safe). Using a reliable web host is another way to protect your website from hackers.

Here’s a small list of companies that offer WordPress hosting

  • Bluehost – BlueHost is a web hosting company that was founded in 1996. It is headquartered in Provo, Utah, and it has a staff of over 700 employees. BlueHost provides a variety of services, including shared hosting, VPS hosting, dedicated hosting, and reseller hosting. It also offers a wide range of features, such as a free domain name, unlimited bandwidth, and a free SSL certificate.
  • WP Engine – WP Engine is a managed WordPress hosting platform that provides a hassle-free experience for website owners and developers. With WP Engine, you can rest assured that your WordPress site is in good hands as it is constantly monitored and protected from security threats. Additionally, WP Engine offers a variety of features and tools to help you get the most out of your WordPress site.
  • DreamPress – DreamPress is a WordPress hosting service that is designed for speed and security. It is a managed WordPress hosting service that includes automatic updates, daily backups, and scalability. DreamPress is a great option for businesses or individuals who want a fast, secure, and reliable WordPress hosting service.
  • HostGator – HostGator is a web hosting company founded in 2002 by Brent Oxley. It is headquartered in Houston, Texas. The company provides shared, reseller, virtual private server, and dedicated web hosting. It also offers domain registration and site builder services. HostGator has over 8 million domains hosted on its servers. The company has won several awards, including the CNET Editor’s Choice Award and the PC Magazine Business Choice Award.
  • Hostinger – Hostinger is a web hosting company that offers a variety of hosting plans to suit the needs of different types of users. The company offers shared hosting, VPS hosting, and dedicated server hosting, as well as a range of other services such as domain registration and website builder tools. Hostinger has a strong focus on providing high-quality services at an affordable price, and its plans start at just $2.15 per month. The company has a wide range of features and extras that make it a great choice for those looking for a reliable and affordable web hosting solution.
  • SiteGround – SiteGround is a web hosting company that offers a variety of services to its customers. Its services include shared hosting, cloud hosting, and dedicated server hosting. SiteGround also offers a wide range of features, such as a free domain name, unlimited bandwidth, and a free SSL certificate.

Restore files from a backup  

There are several ways to take a backup of your website. You can use a plug-in, use features in the site/server management platform (such as Cpanel), or request an old backup from your web host (sometimes, they take one for their use). If your website is compromised, you can use the backup to restore your files. Note that the backup should precede the date the site was hacked.  

If the website was hacked after the backup was taken, then the files may be infected, and you will have to clean the website anyway. If not, and you are able to restore a safe version of the website, you still have to change the password, download the latest WordPress version, and perform other sundry checks.  

Remove the malware  

Your web host will tell you which files are infected. Hackers usually target core files, theme files, and plug-in files. If your core files are infected, you can solve that problem by just overwriting the files by installing a new version of WordPress. If the theme is infected, install a new theme from the WordPress control panel, and then delete the folder containing the older theme. Note that if you delete the theme folder without first installing a new theme, your website will stop working. If a plug-in is infected, delete the plug-in folder. 

Ask support to check your website  

After you’ve restored your website, ask support to scan your website for malware again. If the website is still infected, they will tell you what to do next.  


Note that the WordPress community is also aware of the threat from hackers. Whenever they detect a potential weakness that hackers can exploit to steal passwords, funds, business information, and visitors’ data, they quickly patch it.  

But despite this strong vigilance, a determined hacker may get in sometimes, and the site will get compromised. If you want to build a WordPress website that will be very difficult to compromise, contact us, and we will discuss how we can help you.

Last Modified:

| Published under:



Leave a Reply

Your email address will not be published. Required fields are marked *