How to Fix WordPress Hacked Website?

How To WordPress Hacked Website
How To WordPress Hacked Website?

Have A Hacked WordPress Site?

Have all your protection measures been pirated on your website hosted by WordPress? Sadly, this is the harsh reality of the modern age that no website is entirely free from being compromised by professional hackers, given all the technology and WordPress security features.

But, do you know, as the owner of your domain, that you can take action that can patch or clean your hacked WordPress site? Let’s look, how!

WordPress Site Hacked Signs

There are some obvious and subtle indicators to confirm that your WordPress was hacked and compromised. Some of the common signs of a WordPress hacked website are:

  1. The website traffic is suddenly dropping or spiking as reported by Google Analytics.
  2. The development of a loophole on the Web Site typically includes the insertion of data or poor links to your site ( e.g., your website footer).
  3. The most visible sign of this website is to be deleted. However, defacing the homepage can be avoided if hackers decide to stay undetected for a longer time.
  4. I can’t log into your WordPress account as an administrator, which suggests that the hacker may have deleted your WordPress admin account.
  5. Creation of WordPress spam user accounts, including user privileges.
  6. Add unknown files and scripts (commonly in the wp-content folder) to your Web server folder.
  7. Due to an overload of HTTP requests to your web server, slow and unresponsive website causes.
  8. Inability to send or receive WordPress email generally caused by WordPress mail server hacking.
  9. Add the hacker to your web server with unplanned activities.
  10. The shift of traffic to your website to another URL.
  11. When the user tries to access the compromised or hacked website by detecting suspicious code or scripts running the website, the browser warns about security dangers.

Steps to Fix a Hacked WordPress Site

The next steps to fix your compromised website are: The following are:

1. Determine Hack Type

The search tools that can find malicious codes will help you do this. In addition, it is also possible for WordPress core files in wp-admin, wp-including, and other root folders to check for any core vulnerabilities.

You can also check the Transparency Report of Google to use your diagnostic tools to indicate your website’s current safety status.

2. Removing Hack

Once the location of the malware files has been identified, you can compare them to the recent data backup to see what changes have taken place. Typically, hack removal includes:

Cleaning the WordPress Hacked Files:

Any main infected files, like the wp-config.php file or the folder for wp-contents, can be manually patched. Any other custom files infected can be cleaned with a backup file or a newly downloaded copy.

Fixing the Hacked Database Tables:

You need this to delete malware from your database tables any infected files. You may also find any malicious typical PHP function like eval, base64 decode, or preg_replace using database searches.

Disable backdoors:

The backdoor PHP functions inserted into files such as wp-config.php along with directories such as /themes, /plugins/ or /Uploads are another tool that hackers use to illegally access your website. For backdoors and legitimated usage of most WordPress plugins, common PHP functions like base64, eval, exec, and preg_replace are used.

Therefore, backdoors have to be properly cleaned to avoid reinfection of the website, in addition to avoiding any fracture to the site.

Correcting and restoring your website can be done by one of the methods listed herein in detail:

  1. Manual Malware Clean-ups
  2. Use of security solutions for WordPress

Manual Malware Clean-ups

How do I repair a hacked WordPress site?

  1. Change passwords
  2. Contact Fixhackedwebsite support
  3. Create a backup (Recommended)
  4. Restore a backup (Optional)
  5. Remove malware
  6. Add a temporary password login to your site
  7. Have your site checked by our support
  8. Secure site to prevent future hacks

In this guide, we’ll show you how to repair a hacked and malware-infected WordPress website. WordPress is the world’s most frequently used CMS. Unfortunately, that means it’s also very popular with hackers.

When we notice a site has been compromised, we take it offline to make sure the hackers have no more access to it. It also helps protect your rating on Google and your guests, as they can get infected just by visiting your site.

Once all malware has been removed, and WordPress updated, you can contact our support to reopen your site.

Step 1 – Change passwords

If your website has been hacked (you suspect) the first thing to do is change your passwords. So, you’re denying hackers access to your webspace.

The following passwords should be changed to:

  • FTP: Setting or changing password (FTP)
  • Database: Update your MariaDB password

Note: Remain to update your wp-config file database password, as your old password will still exist.

Step 2 – Contact FixHackedWebsite Support

The next step is to contact our service provider. We will provide you with more information on the hacking form and include a list of malware-infected files. Ask for restored FTP access, which makes fixing things easier.

Tip: You can still access your website with File Manager or SFTP even when FTP access is suspended.

Step 3 – Create a backup (Recommended)

We suggest that you make one before making any changes if you do not have a recently created site backup. This way, if something goes wrong, you still have access to all your files and material.

In the control panel, you can use Backup & Restore and restore your site with a single click. You can also back up your webspace and servers manually. For more information, see the guides below.

  • Backup and Restoration began
  • Save your website through FTP
  • Save your File Manager Webspace

Step 4 – Restore a backup (Optional)

Now is the time to restore the site if you’ve got a backup. Be aware that before the backup was created, your website could have been hacked. You still have to manually delete the malware in that case.

By comparing the date your backup has been created with the date that your site infected files have been last modified, you can check this. This means your site was already hacked if you have your backup from a later date.

Sadly, hackers often exploit the file change date occasionally. You can always ask our support to take a look if your backup is clean.

Note: Even if your website has been compromised with the backup, changing password, upgrading to the new version, and checking for other vulnerabilities are still quite necessary.

Step 5 – Remove malware

It’s time to remove other malware from your site, through the File Manager list of infected files. You can also contact our help to request an updated list of infected files.

The infected files fell under one of the three groups in 90 % of the cases:

  • Core files
  • Plugins
  • Themes

Core files – The main files from your website’s manager GUI. They are at the root and the folders for wp-admin and wp-include. You can easily overwrite these files with a new download from WordPress if they are infected.

See our step-by-step guide for the process:

Manually updating WordPress

Plugins – Usually, the malware is located in a plugin if the hacker has accessed it through a plugin.

The entire folder containing your plugin can be safely removed. Then from your dashboard, you can reinstall it. In wp-content > plugins you find the plugin tab.

Themes – The Malware would be in the thematic folder if the hacker has access to a theme. You can safely remove the entire folder if the infected files are part of a topic you are not actively using.

If the infected files are part of the topic you are using, the theme in the database should first be changed. Your site will otherwise cease to work. You can then delete the folder safely.

See our guide on how this can be done: From the database change the WordPress theme.

Step 6 – Add a temporary password login to your site (Recommended)

We suggest that you (temporarily) use a password to secure your account. This way, all your plug-ins, and themes can be safely updated. You can delete the login again if your website is fully updated and safe.

Use the .htaccess file to add a login to your site. For more information, check out our guide.

Step 7 – Have your site checked by our support

Access can be restored if all of the malware and all plugins, topics, or password protection have been removed from your website and you have updated WordPress.

Our support checks your site and reopened it or tells you what you have yet to do. You can email or chat to contact our support.

Step 8 – Secure site to prevent future hacks

Now it’s a good idea to make sure your site is safe again since you have access to your WordPress dashboard.

Check plugins and themes

Go through all your plugins and topics and take out the ones you do not need. Check also whether you still maintain plugins and themes you use. It is a good idea to look for an alternative if you can see that a plugin hasn’t been updated last year.

Check WordPress users and reset passwords

Hackers sometimes create a dashboard with their own users. Go through the created users and remove any users you don’t know about. It is also a safe idea to update all users’ passwords.

Security Solutions for WordPress

If you do not have the technical expertise to manually clean up, a practical WordPress security solution should be used. Additionally, most professional hackers hide their malicious scripts in various WordPress folder locations that allow repeated hacking, scanning, and removing.

The majority of the security solutions available patch the hacked website with the following steps:

Scan for the malware and the location of the infected file. Scan. Popular WordPress plugins such as Sucuri WordPress auditing show your core WordPress files’ safety status, as well as where hacked files are located.

Remove the malware to be remedied and washed. While WordPress protection solutions, such as MalCare offers auto-cleaning equipment, the authenticity checker Theme provides two methods of enforcing this fix: either manually deleting the infected code or replacing the infected file with the original clean file, which is a malicious code in the installed themes.

Restoration of your WordPress site

This is one of the fastest ways to restore the running mode of your hacked WordPress site. This approach can only be applied if you have regularly backed up your database and the backup itself is not compromised. However, you can lose valuable data by restored your site using the backup method if your site has regular content updates and user comments.

A second limitation of backup restoring is that no new compromised files or directories introduced by the hackers can be deleted so that they can constantly damage the website.

Fixing the Vulnerability of Your WordPress Website

Together with your hacked website being patched and restored, it is also important to fix the security website defects that first and foremost led to the hacking. Even after the compromised website has been cleaned and restored, most hackers can make use of the security loopholes. Below is a list of points to remember that your WordPress website removes security loopholes:

  1. Use the latest updates for all software on your WordPress website because of the outdated software tools, most of the vulnerabilities arise.
  2. Update all the plugins and themes installed by WordPress. Because of the vulnerabilities in third-party plug-ins and topics, most of the WordPress hacks happen, it is important that you inform the plugin development team which can develop and release a security patch.
  3. Remove them from your site if you do not use certain plugins.
  4. Additional steps included checking WordPress admin user permissions, disabling of WordPress admin user cookies in order to prevent future hacks, as well as updating your password for the WordPress account.
  5. The WordPress website is fortified with many tech instruments, in order to popular the entry points for hackers. Apply WordPress recommendations for how the website can be hardened.
  6. You may use security solutions from WordPress that provides self-hardening tools.
  7. To secure your site, install a WordPress firewall Plugin and reduce the risk for a future hack.


With the growing number of Websites hacked or jeopardized, website owners must learn to stay quiet and complete the entire clean-up and Restoration process to prevent further safety deterioration in the future. Comment below when you have questions on a hacked WordPress website.