{"id":2648,"date":"2022-01-31T06:38:38","date_gmt":"2022-01-31T06:38:38","guid":{"rendered":"https:\/\/www.hostitsmart.com\/blog\/?p=2648"},"modified":"2025-12-19T17:30:17","modified_gmt":"2025-12-19T12:00:17","slug":"what-to-do-when-your-website-is-hacked","status":"publish","type":"post","link":"https:\/\/www.hostitsmart.com\/blog\/what-to-do-when-your-website-is-hacked\/","title":{"rendered":"What To Do When Your Website Is Hacked"},"content":{"rendered":"<p><span>On average 30,000 websites are hacked every day and almost 64% of the companies worldwide have faced cyberattacks at least once. Also according to some reports, an average website is attacked 44 times per day by hackers. So if your website is hacked, do not stress much as it\u2019s not the first time a website got hacked. Websites have faced cyberattacks in the past and recovered from them. <\/span><\/p>\n<p><span>But you should not delay the recovery process as that could cause you a lot of harm to you and your website users. Today in this blog, we will tell you what you can do if you suspect your website is compromised or hacked and how you can recover your website to make it function again. Sit back, relax, and here we go&#8230;<\/span><\/p>\n<hr>\n<p><b>Also Read: <\/b><a href=\"https:\/\/www.hostitsmart.com\/blog\/10-common-reasons-for-a-website-crash\/\"><b>10 Common Reasons For A Website Crash<\/b><\/a><\/p>\n<hr>\n<h2><span class=\"ez-toc-section\" id=\"Firstly_know_how_it_happened\"><\/span><b>Firstly know how it happened?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span>Before we move to the solution of a problem, we must analyze and understand <\/span><span>&nbsp;<\/span><span>how the problem started first, because as they say, \u2018sometimes the solution of a <\/span><span>&nbsp;p<\/span><span>roblem lies in the problem itself.\u2019 Here are a few steps you can consider to help you know if your site is really compromised or not &#8211;<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Run_a_Malware_Scan\"><\/span><b>1. Run a Malware Scan<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Most websites have malware scanners these days for security. It helps you detect any malicious activity with your site. So if you are also having a malware scanner, run the scan and see what files are infected. Also, in the scan history section, you can check when your site got infected. After identifying infected files you can go through the source code and find the infecting code snippet. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_SiteCheck\"><\/span><b>2. SiteCheck<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>You can also use an external link to check any malicious activity on your site such as SiteCheck. Note any warnings, locations, payloads you receive. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Manual_Check\"><\/span><b>3. Manual Check<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Manually check your website\u2019s files to see any modification or suspicious activity. You can also compare your site\u2019s current version with the backup version (if you have) to notice changes. <\/span><\/p>\n<hr>\n<p><b>Also Read: <\/b><a href=\"https:\/\/www.hostitsmart.com\/blog\/top-5-reasons-business-owners-need-website-backup\/\"><b>Top 5 Reasons Business Owners Need Website Backup<\/b><\/a><\/p>\n<hr>\n<h2><span class=\"ez-toc-section\" id=\"Things_to_do_first\"><\/span><b>Things to do first:<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1_Contact_your_Hosting_Provider\"><\/span><b>1. Contact your Hosting Provider<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Contact your hosting provider immediately. They can help you analyze the situation better. In case, you are not able to access Cpanel, they can help you change passwords too.<\/span><\/p>\n \n<h3><span class=\"ez-toc-section\" id=\"2_Under_Maintenance\"><\/span><b>2. Under Maintenance<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Takedown your site from the internet for some time till the time you fix it so the hacker can\u2019t mislead users much. You can put an \u2018under maintenance\u2019 notice for those trying to access your site.&nbsp; Your <\/span><a href=\"https:\/\/www.hostitsmart.com\/web-hosting\"><b>Hosting Provider<\/b><\/a><span> can help you with this. <\/span><\/p>\n<hr>\n<p><b>Also Read: <\/b><a href=\"https:\/\/www.hostitsmart.com\/blog\/website-development-checklist-to-help-create-your-first-website\/\"><b>Website Development Checklist To Help Create Your First Website<\/b><\/a><\/p>\n<hr>\n<h3><span class=\"ez-toc-section\" id=\"3_Clean_your_website\"><\/span><b>3. Clean your website<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>After you have identified the infected files, clean all the files with the website security tool. The website security tool is very important for a website, so must have it. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Change_Passwords\"><\/span><b>4. Change Passwords<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Change all the passwords. And all means \u2018all\u2019. You can also consider taking the help of your hosting provider for this. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_Restore_Backup\"><\/span><b>5. <\/b><b>Restore Backup<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>If you have a backup for your site that you know is not corrupted, you can restore that. If you do not have any backup, ask the hosting Provider once, they might have it.<\/span><\/p>\n<hr>\n<p><b>Also Read: <\/b><a href=\"https:\/\/www.hostitsmart.com\/blog\/ways-to-backup-a-wordpress-website-without-a-plugin\/\"><b>Ways To Backup A WordPress Website Without A Plugin.<\/b><\/a><\/p>\n<hr>\n<h3><span class=\"ez-toc-section\" id=\"6_Send_Website_for_Review\"><\/span><b>6. Send Website for Review<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Your website might have got blacklisted by&nbsp; Google because of the infection. Send a review request to Google Search&nbsp; Console. Again, your hosting provider can be a big help here.&nbsp;<\/span><\/p>\n<p><span>Depending on the level of threat, there are different procedures to follow. In the general case, these steps will help you identify and recover your website from any malware attacks. But if the infection has gone beyond, you might need to clear all your files from the server and database and might need to start fresh.&nbsp;<\/span><span>&nbsp;<\/span><\/p>\n<p><span>But you shouldn\u2019t stress right now. You must contact your hosting provider at the first stage and let them know about the attack.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Secure_Website_for_future\"><\/span><b>Secure Website for future<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span>The problem is not solved completely if you have recovered your site now. To protect your website from any future attacks, we suggest you follow these steps &#8211;<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Fix_the_weakness\"><\/span><b>1. Fix the weakness<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>See what got you hacked in the first place and fix the weakness. Close all the doors for the thief to enter again. You should ensure all your passwords are strong and unique.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Install_a_security_plugin\"><\/span><b>2. Install a security plugin<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Building a beautiful house and not making a lock in the door? Security is always the first thing to worry about. So,&nbsp; install a Security plugin with great user reviews to prevent your site from being hacked in the future. You can also refer to our article on <\/span><a href=\"https:\/\/www.hostitsmart.com\/blog\/best-wordpress-security-plugins\/\"><b>Best Security Plugins for WordPress<\/b><\/a> <span>for this. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Update_your_website_Software\"><\/span><b>3. Update your website Software<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Very basic but very important. Update your website software and always keep them updated to ensure better security as updated versions are more secure than the older ones. <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Scan_Your_Computer\"><\/span><b>4. Scan Your Computer<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Scan your computer with the help of antivirus and keep it always infection-free. An infected computer can be the reason behind an infected website and the transmission of malware.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_Backup_your_site\"><\/span><b>5. Backup your site<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span>Always, always, always have a backup of your site in case of any attack situation. Security Plugins or your hosting provider can help you with this. <\/span><\/p>\n<hr>\n<p><b>Read More: <\/b><a href=\"https:\/\/www.hostitsmart.com\/blog\/best-practices-to-secure-your-website\/\"><b>Best Practices To Secure Your Website<\/b><\/a><\/p>\n<hr>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><b>Conclusion<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span>Firstly, just calm yourself. A balanced mind will provide more balanced solutions than an anxious one. Now just run a malware check or manually check your site to detect any malicious or suspicious activity. You can try comparing your backup version and current version to look for any changes. If you have identified the infected files, clean them with a website security tool. You might need to delete a few files. <\/span><\/p>\n<p><span>Change all the passwords and credentials. Now, <\/span><span>&nbsp;<\/span><span>restore a non-compromised backup of your site. If you and your hosting <\/span><span>p<\/span><span>rovider both don\u2019t have any backup for your site and the infection is not curable then you might need to start from scratch. Always create a backup.<\/span> <span>Whatever happens, everything will come back to normal in some time. So, no need to be over-anxious for a temporary situation. So, go and recover your site with a calm mind and follow the steps above!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On average 30,000 websites are hacked every day and almost 64% of the companies worldwide have faced cyberattacks at least [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5949,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[57],"tags":[],"class_list":["post-2648","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/posts\/2648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/comments?post=2648"}],"version-history":[{"count":6,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/posts\/2648\/revisions"}],"predecessor-version":[{"id":10456,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/posts\/2648\/revisions\/10456"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/media\/5949"}],"wp:attachment":[{"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/media?parent=2648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/categories?post=2648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/blog\/wp-json\/wp\/v2\/tags?post=2648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}