WordPress websites could be some of the most vulnerable so you can get hacked because of the popularity of the platform. Usually when people reach out for help, it’s because their site was hacked once, they fixed it–and then it had been hacked again.
“Why did my WordPress website get hacked again when i fixed it?”
Whenever your WordPress site gets hacked for another time, it’s usually due to a backdoor created by the hacker. This backdoor allows the hacker to bypass the normal procedures for getting into your site, getting authentication without you realizing. On this page, I’ll explain how to locate the backdoor and correct it in your WordPress website.
So, what’s a backdoor?
A “backdoor” is really a term referring to the technique of bypassing normal authentication to get into your site, thereby accessing your site remotely without you even realizing. If a hacker is smart, this is the very first thing that gets uploaded whenever your site is attacked. This allows the hacker to possess access again later on even after you find the malware and remove it. Unfortunately, backdoors usually survive site upgrades, therefore the site is vulnerable until you clean it completely.
Backdoors could be simple, allowing a user only to create a hidden admin user account. Others are more complex, allowing the hacker to execute codes sent from the browser. Others have a whole interface (a “UI”) that provides them the opportunity to send emails from your server, create SQL queries, etc.
Where may be the backdoor located?
For WordPress websites, backdoors are commonly located in the following places:
1. Plugins – Plugins, especially out-dated ones, are an excellent place for hackers to hide code. Why? Firstly, because people often don’t think to log to their site to check on updates. Two, even though they do, people don’t like upgrading plugins, since it takes time. It can also sometimes break functionality on a niche site. Thirdly, because you can find tens of thousands of free plugins, many of them are an easy task to hack into to begin with.
2. Themes – It isn’t so much the active theme you’re using however the other ones stored in your Themes folder that may open your site to vulnerabilities. Hackers can plant a backdoor in one of the themes in your directory.
3. Media Uploads Directories – Most people have their media files set to the default, to generate directories for image files based on months and years. This creates a variety of folders for images to be uploaded to–and many opportunities for hackers in order to plant something within those folders. Because you’d rarely ever check through all those folders, you wouldn’t discover the suspicious malware.
4. wp-config.php File – this is among the default files installed with WordPress. It’s one of the first places to look when you’ve had an attack, because it’s probably the most common files to be hit by code hackers.
5. The Includes folder – Another common directory because it’s automatically installed with WordPress, but who checks this folder regularly?
Hackers also sometimes plant backups to their backdoors. So when you may remove one backdoor… there may be others living on your own server, nested away safely in a directory you won’t ever look at. Smart hackers also disguise the backdoor to check such as a regular WordPress file.
What can you do to completely clean up a hacked WordPress site?
After reading this, you might guess that WordPress is the most insecure type of website you can have. Actually, the latest version of WordPress does not have any known vulnerabilities. WordPress is continually updating their software, largely due to fixing vulnerabilities when a hacker finds a means in. So, by keeping your version of WordPress up to date, you can assist in preventing it from being hacked.
Next, you can try these steps:
1. It is possible to install malware scanner WordPress plugins, either free or paid plugins. That you can do a search for “malware scanner WordPress plugin” to get several options. A few of the free ones can scan and generate false positives, so that it can be hard to know what’s actually suspicious unless you’re the developer of the plugin itself.
2. Delete inactive themes. Remove any inactive themes you are not using, for reasons mentioned previously.
3. Delete all plugins and reinstall them. This can be time-consuming, nonetheless it wipes out any vulnerabilities in the plugins folders. It’s a good idea to first create a backup of one’s site (you can find free and paid backup plugins for WordPress) before you begin deleting and reinstalling.
4. Develop a fresh .htaccess file. Sometimes a hacker will plant redirect codes in the .htaccess file. You can delete the file, and it will recreate itself. If it doesn’t recreate itself, it is possible to manually do that by going to the WordPress admin panel and clicking Settings >> Permalinks. When you save the permalinks settings, it’ll recreate the .htaccess file.
5. Download a brand new copy of WordPress and compare the wp-config.php file from the new version to the one in your directory. If there’s anything suspicious in your present version, delete it.
6. Lastly, to be completely sure your website does not have any hack (beyond using paid monitoring services), you can delete your site and restore it to a romantic date that the hack wasn’t there from your hosting control panel. This will delete any updates you’ve made to your site after that date, so it’s not just a great option for everyone. But at the very least it cleans you out and peace of mind.
In the future, you can:
1. Update your admin account. Create a new user with Administrator capabilities, then delete the old one you’re using.
2. Install a plugin to limit login attempts. This can keep someone locked out after a certain amount of attempts to get in.
3. Password protect the WP-admin directory. This might be done during your internet hosting control panel. If Fix hacked wordpress website uses cPanel, this is easily done with a couple clicks. Contact your host to figure out how exactly to password-protect a directory or do a search for it on your hosting company’s website.
4. Create regular backups. By burning your site regularly, you understand you’ll have a copy to restore the website with if it would get hacked. There are free and paid plugins open to help with this, or you might be able to develop a backup of the entire account from your own hosting control panel. Or, though slower but still an option, it is possible to download the complete site via FTP software.
With regards to security, it helps to go on it seriously. Backing up your site is among the best things you can do, because your hosting company may not do that for you personally. Some may offer backups/restore features in the event that you activate them, plus some may create random backups every few weeks. But you don’t desire to depend on the host because this isn’t in their scope of services. To be more certain, you should use paid malware monitoring services and plugins to be able to watch your site so you need not worry about it.