{"id":1522,"date":"2019-02-08T10:35:57","date_gmt":"2019-02-08T10:35:57","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/1583339-how-to-fix-a-malware-infected-wordpress-website-at-hostinger\/"},"modified":"2026-09-22T10:05:12","modified_gmt":"2026-09-22T10:05:12","slug":"1583339-how-to-fix-a-malware-infected-wordpress-website-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/1583339-how-to-fix-a-malware-infected-wordpress-website-at-hostinger\/","title":{"rendered":"How to fix a malware-infected WordPress website at Hostinger"},"content":{"rendered":"<p>Fix a malware-infected WordPress website at Hostinger by identifying signs of infection, removing malicious content, and preventing future attacks.<\/p><h2 id=\"h-signs-of-a-malware-infection\">Signs of a malware infection<\/h2><p class=\"no-margin\">There are a few things to look for that can indicate a potential malware infection:<\/p><ul>\n<li>\n<p class=\"no-margin\">Unexpected deny rules on your .htaccess file.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Files on your website&rsquo;s root folder that you did not create either manually or via a custom script\/cron job.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Files such as index.php containing large amounts of unreadable code.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Your WordPress admin page does not load the style properly.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Your website is redirected to another site which you don&rsquo;t recognize<\/p>\n<\/li>\n<li>A fake Cloudflare verification screen prompts you to copy and run a command in your terminal or Run dialog<\/li>\n<li>\n<p class=\"no-margin\">Our Malware Scanner has identified and removed compromised or infected files<\/p>\n<\/li>\n<\/ul><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">If your account or site shows broader signs of compromise beyond WordPress specifically, see <a data-click-id=\"hgr-post-content-link-what-to-do-if-your-account-or-site-has-been-hacked\" href=\"https:\/\/www.hostinger.com\/support\/1583390-what-to-do-if-your-account-or-site-has-been-hacked-at-hostinger\/\">what to do if your account or site has been hacked<\/a>.<\/div><h2 id=\"h-remove-the-malware\">Remove the malware<\/h2><p class=\"no-margin\">At Hostinger, on our Web Hosting and Cloud Hosting plans, we have an automatic <a data-click-id=\"hgr-post-content-link-malware-scanner\" class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/support\/6197555-how-to-use-the-malware-scanner-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">Malware Scanner<\/a> that will help identify and remove malicious files on your account.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">If you want to clean up your website manually, you can use security plugins such as <a data-click-id=\"hgr-post-content-link-wordfence\" class=\"intercom-content-link\" href=\"https:\/\/www.wordfence.com\/\" target=\"_blank\" rel=\"noopener\">WordFence<\/a> or <a data-click-id=\"hgr-post-content-link-anti-malware-security\" class=\"intercom-content-link\" href=\"https:\/\/wordpress.org\/plugins\/gotmls\/\" target=\"_blank\" rel=\"noopener\">Anti-Malware Security<\/a>. Here&rsquo;s a step-by-step tutorial on how to clean up an infected WordPress site using the WordFence plugin: <a data-click-id=\"hgr-post-content-link-wordpress-malware-removal-guide\" class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/tutorials\/wordpress-malware-removal\/\" target=\"_blank\" rel=\"noopener\">WordPress Malware Removal Guide<\/a>.<\/p>\n<\/div><p class=\"no-margin\">If your website presents <b>issues after cleanup<\/b>, you can consider <a data-click-id=\"hgr-post-content-link-restoring-it-from-a-backup\" class=\"intercom-content-link\" href=\"\/support\/4283700-how-to-restore-backups-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">restoring it from a backup<\/a>. Please note that this would revert any changes you made after the backup date.<\/p><h2 id=\"h-remove-malware-that-keeps-reinfecting-your-wordpress-website\">Remove malware that keeps reinfecting your WordPress website<\/h2><p>Malware that returns shortly after you remove it usually persists somewhere other than your website files, such as your database, a hidden WordPress user account, or a browser login cookie. Complete the following steps to remove a persistent infection:<\/p><ol>\n<li>Delete any WordPress administrator account you don&rsquo;t recognize in the <strong>Users<\/strong> section of your WordPress Admin area. Malware can create a hidden admin account that stays logged in through its own cookies, so a password reset alone does not remove it.<\/li>\n<li>Generate new authentication keys and update your <a data-click-id=\"hgr-post-content-link-wp-config-php\" href=\"https:\/\/www.hostinger.com\/tutorials\/how-to-use-wp-config-php-wordpress-function\/\">wp-config.php<\/a> file with them to invalidate old login cookies.<\/li>\n<li>Review your wp-content\/mu-plugins folder and remove any file you don&rsquo;t recognize. Files in this folder run automatically and do not appear in your WordPress Admin area plugin list.<\/li>\n<li><a data-click-id=\"hgr-post-content-link-restore-your-websites-files-and-database\" href=\"https:\/\/www.hostinger.com\/support\/4283700-how-to-restore-backups-at-hostinger\/\">Restore your website&rsquo;s files and database<\/a> together from the same backup point. Restoring only the files can leave a reinfected database in place.<\/li>\n<\/ol><p><a data-click-id=\"hgr-post-content-link-contact-hostinger-support\" href=\"https:\/\/www.hostinger.com\/support\/1583780-how-to-contact-hostinger-support\/\">Contact Hostinger support<\/a> about a paid malware cleanup if the infection returns after completing these steps.<\/p><p><strong>NOTE<\/strong><\/p><ul>\n<li>The exact entry point of a malware infection usually can&rsquo;t be confirmed after the fact. Outdated or cracked plugins and themes, and compromised local devices, remain the most common causes.<\/li>\n<\/ul><h2 id=\"h-prevent-future-infections\">Prevent future infections<\/h2><p class=\"no-margin\">Keep in mind that only removing the infected files <b>may not be enough<\/b> to contain the infection. It is very important that you tackle <b>the reason <\/b>why the infection occurred in the first place. In order to eliminate any vulnerabilities and keep your websites safe, please do the following steps:<\/p><ul>\n<li>\n<p class=\"no-margin\">Use strong passwords: unique, with more than 8 characters using letters, numbers, and special characters<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Keep <b>WordPress<\/b>,<b> <\/b>themes, and plugins <b>updated<\/b> to the <b>latest stable version<\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Avoid plugins and themes <b>from unknown or third-party providers<\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Protect your website&rsquo;s contact\/registration\/login forms with <a data-click-id=\"hgr-post-content-link-recaptcha\" class=\"intercom-content-link\" href=\"https:\/\/www.google.com\/recaptcha\/about\/\" target=\"_blank\" rel=\"noopener\">reCAPTCHA<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><a data-click-id=\"hgr-post-content-link-generate-and-download-backups-of-your-website-periodically\" class=\"intercom-content-link\" href=\"\/support\/5981435-how-to-download-backups-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">Generate and download backups of your website periodically<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Scan your local device with an antivirus software such as <a data-click-id=\"hgr-post-content-link-malwarebytes\" class=\"intercom-content-link\" href=\"https:\/\/www.malwarebytes.com\/\" target=\"_blank\" rel=\"noopener\">Malwarebytes<\/a><\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">Learn more:<b> <\/b><a data-click-id=\"hgr-post-content-link-keeping-your-wordpress-website-safe\" class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/tutorials\/how-to-secure-wordpress\/\" target=\"_blank\" rel=\"noopener\">Keeping your WordPress website safe<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Removing malware from WordPress and preventing infections<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[273],"tags":[],"class_list":["post-1522","post","type-post","status-publish","format-standard","hentry","category-website-security"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583339-how-to-fix-a-malware-infected-wordpress-website-at-hostinger","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/1583339-como-arreglar-un-sitio-de-wordpress-con-malware-en-hostinger","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583339-comment-reparer-un-site-wordpress-avec-des-logiciels-malveillants-hostinger","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/1583339-cara-memperbaiki-wordpress-dengan-malware-di-hostinger","default":0},{"locale":"lt-LT","link":"https:\/\/www.hostinger.com\/lt\/support\/1583339-kaip-pataisyti-wordpress-svetaine-nuo-kenkejiskos-programos-hostinger-platformoje","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/1583339-como-corrigir-um-site-wordpress-com-malware-hostinger","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/1583339-\u044f\u043a-\u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438-\u0448\u043a\u0456\u0434\u043b\u0438\u0432\u0435-\u043f\u0437-\u043d\u0430-\u0441\u0430\u0439\u0442\u0456-wordpress-hostinger","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1522"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1522\/revisions"}],"predecessor-version":[{"id":18666,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1522\/revisions\/18666"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}