Last Updated on December 28, 2022 by Steve
Hacked WordPress sites are a unfortunate reality. In a recent post WordPress Security Complete Guide I discussed the steps that should be taken to secure your WordPress site. Hopefully incorporating these procedures will keep your site safe. Unfortunately the best defense does not always prevent all attacks. A determined hacker can find a way. Regardless a plan should be in place to mitigate loss if an attack were to become successful. This guide will discuss the steps that should be taken to fix your hacked WordPress site. These steps will help to restore your site to 100% operational status, remove all malware if any, and undue any damage that was done.
First Thing To do is Confirm You Have A Hacked WordPress Site
If your site was hacked, first off, don’t panic. This won’t help you and the deed is done so it’s important to act quickly. Start by checking your site and see if you can log in to your dashboard. Check if your site is redirecting to another site or if you see any suspicious or strange links or ads.
Change your password immediately and then proceed to the next step.
Contact Your Hosting Company
Contact your host and let them know your site has been hacked. They can help you identify the source of the hack. Some hosts will also clean up your site and remove the malicious code and files.
Restore Your Site From Backup
If you’ve been diligent about backing up your site, locate a backup from before the hack and use it to restore your site. While you might lose some of the content, you’ll be able to get your site up and running as it was before the attack happened. If you used UpdraftPlus plugin to back up WordPress this guide can assist you in restoration.
Scan Your Hacked WordPress Site For Malware
There are many plugins out there that can do this but in my opinion iThemes Security Pro is one of the best, if not the best. Not only can you use this premium plugin to secure you WordPress site but it can also be used to scan for malware. All Best WordPress Solution customers have access to this plugin for free from us to install in their WordPress site if they choose to.
Check Your Site For Suspicious Users
Login to your WordPress website and go to Users > All Users. Make sure there are no users who shouldn’t be there and delete them if necessary.
A plugin such as WP Activity Log can be used to monitor users. The #1 user-rated activity log plugin. This plugin keeps a comprehensive log of the changes that happen on your site. It has a free version that can be downloaded from wordPress.org and premium upgrade. Be careful how much you log however because this can fill up your database and slow down your site.
Change WordPress Secret keys
Use the aforementioned WordPress Salts Key Generator in WordPress Security Guide to generate new security keys and add them to your wp-config.php file. Since those keys encrypt your password, the hackers will remain logged in until their cookies are invalidated. New security keys will do just that and force the hacker out of your site.
Hire Professional For Malware Removal
Finally, hire a professional to clean up the hack and remove the malware from your site. Keep in mind that hackers can hide malicious code in multiple files so if you’re not experienced with malware removal, it’s easy to miss an infected file. This makes it easy for hackers to hack your site again so hiring a professional is highly recommended.
No website is impervious to intrusion. The best laid out security implementation may not stop a determined hacker. Procedures should be in place to ensure if your site is hacked you can get back up and running right away. This guide can help you in case you become an unfortunate victim of a hacked WordPress site.