{"id":713,"date":"2016-12-15T00:00:00","date_gmt":"2016-12-15T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/remove-malware-from-wordpress-site-wordfence\/"},"modified":"2026-11-27T12:03:47","modified_gmt":"2026-11-27T12:03:47","slug":"wordpress-malware-removal","status":"publish","type":"post","link":"\/ng\/tutorials\/wordpress-malware-removal\/","title":{"rendered":"How to remove WordPress malware and recover your website"},"content":{"rendered":"<p class=\"wp-block-paragraph\">To remove WordPress malware, you&rsquo;ll need to delete suspicious files and then check for malicious code hiding in your database, plugins, themes, or other website files, as well as compromised user accounts. Otherwise, the infection might return even after a malware scan appears clean.<\/p><p class=\"wp-block-paragraph\">You might be dealing with a malware infection if you notice strange behavior on your WordPress website, like unauthorized redirects or content changes. This can result from outdated or vulnerable software, compromised credentials, or other security weaknesses. By acting quickly, you can limit the damage and prevent further unauthorized access.<\/p><p class=\"wp-block-paragraph\">WordPress malware recovery has five stages:<\/p><ol class=\"wp-block-list\">\n<li>Identifying the infection.<\/li>\n\n\n\n<li>Containing the problem.<\/li>\n\n\n\n<li>Removing malware with an automatic tool, clean backup, or manual cleanup.<\/li>\n\n\n\n<li>Verifying the site is clean and safe.<\/li>\n\n\n\n<li>Taking steps to prevent reinfection.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Complex or recurring infections can require a professional malware removal service.<\/p><h2 id=\"h-how-to-tell-if-your-wordpress-site-has-malware\" class=\"wp-block-heading h-t-title-2\">How to tell if your WordPress site has malware<\/h2><p class=\"wp-block-paragraph\">You can tell if your WordPress site has malware if you notice warning signs such as unexpected redirects, unauthorized content changes, or strange administrator accounts. Other signs include modified website files, browser or search engine warnings, and unusual site behaviors like decreased performance.<\/p><p class=\"wp-block-paragraph\">WordPress malware infections are not always easy to spot. Some cause visible changes to your website while others may run in the background without affecting your site&#8217;s appearance or functionality.<\/p><p class=\"wp-block-paragraph\">Here are some common signs that your WordPress site might be infected:<\/p><ul class=\"wp-block-list\">\n<li><strong>Unexpected redirects.<\/strong> Your website redirects visitors to spam pages or phishing sites.<\/li>\n\n\n\n<li><strong>Unauthorized content changes.<\/strong> You notice unfamiliar pages, spam links, or malicious scripts added to your website without your permission.<\/li>\n\n\n\n<li><strong>Unknown administrator accounts.<\/strong> New users with administrator privileges appear in your WordPress dashboard.<\/li>\n\n\n\n<li><strong>Modified website files.<\/strong> Your WordPress core files, plugins, or themes contain unexpected changes or unfamiliar code.<\/li>\n\n\n\n<li><strong>Browser or search engine warnings.<\/strong> Web browsers or search engines flag your website as unsafe, discouraging visitors from accessing it.<\/li>\n\n\n\n<li><strong>Unusual website behavior.<\/strong> Your site suddenly becomes very slow, displays unfamiliar pop-ups, or produces unexplained errors.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">These warning signs don&#8217;t always confirm a malware infection. For example, slow load times or website errors can also result from plugin conflicts or server issues.<\/p><p class=\"wp-block-paragraph\">Malware is often only one part of a <a data-click-id=\"hgr-post-content-link-hacked-wordpress-site\" href=\"\/ng\/tutorials\/hacked-wordpress\/\" target=\"_blank\" rel=\"noopener\">hacked WordPress site<\/a>, which can also involve stolen credentials or unauthorized changes to your hosting environment.<\/p><p class=\"wp-block-paragraph\">To confirm whether your WordPress site is infected, run a scan using a reputable WordPress security plugin like Wordfence or a malware scanner provided by your host.<\/p><p class=\"wp-block-paragraph\">Many scanners only check website files, so they can miss infections hidden in your WordPress database. For a more thorough assessment, you may also need to inspect your database, user accounts, and recent website changes.<\/p><h2 id=\"h-what-to-do-before-removing-wordpress-malware\" class=\"wp-block-heading h-t-title-2\">What to do before removing WordPress malware<\/h2><p class=\"wp-block-paragraph\">Before removing WordPress malware from your website, take three precautions to preserve important data and limit further damage. These steps also help you investigate the cause of the infection.<\/p><h3 class=\"wp-block-heading h-t-title-3\">1. Restrict access to the infected website<\/h3><p class=\"wp-block-paragraph\">Restrict access to your infected website by password-protecting it or allowing only specific IP addresses through your hosting control panel. Do this as soon as your site redirects visitors to malicious pages, distributes harmful downloads, or displays phishing content.<\/p><p class=\"wp-block-paragraph\">You can also restrict access using <strong>.htaccess<\/strong> on Apache or LiteSpeed servers when you have access to your server&rsquo;s configuration files.<\/p><p class=\"wp-block-paragraph\">Maintenance mode may inform visitors about the interruption, but it doesn&#8217;t necessarily prevent malicious scripts or redirects from running. Use hosting-level access restrictions when the infected website poses an active risk to visitors.<\/p><p class=\"wp-block-paragraph\">Restricting public access doesn&#8217;t necessarily block attackers who can already access your hosting account or WordPress dashboard. Secure compromised accounts and revoke suspicious sessions immediately if you suspect unauthorized access.<\/p><h3 class=\"wp-block-heading h-t-title-3\">2. Back up your WordPress website<\/h3><p class=\"wp-block-paragraph\">Create a backup of your WordPress website&rsquo;s files and database through your hosting control panel, a backup plugin, or manually with File Transfer Protocol (FTP) and a database management tool like phpMyAdmin. Make sure to <a data-click-id=\"hgr-post-content-link-back-up-your-wordpress-site\" href=\"\/ng\/tutorials\/backup-wordpress\/\" target=\"_blank\" rel=\"noopener\">back up your WordPress site<\/a> before you modify or delete anything.<\/p><p class=\"wp-block-paragraph\">Even though the backup may contain malware, a copy of the affected site helps you investigate suspicious changes. You&#8217;ll also be able to recover accidentally deleted content if something goes wrong during cleanup.<\/p><p class=\"wp-block-paragraph\">Hostinger users can download file and database backups from the Backups page in the Hostinger dashboard. Go to <strong>Websites<\/strong> &rarr; <strong>Manage site<\/strong> and select <strong>Backups<\/strong> from the sidebar. Business and higher-tier plans can also generate manual backups.<\/p><div class=\"wp-block-image\"><figure data-wp-context=\"{&quot;imageId&quot;:&quot;6b0b0b25686fc&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6b0b0b25686fc\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/image1.png\/w=1024,h=1024,fit=scale-down\" alt=\"Backups page in the hosting control panel with the &quot;Manage Backups&quot; tab open. Four option cards are shown: Restore website, Files backups, Database backups, and Generate new backup. The &quot;Generate new backup&quot; card is highlighted with a red box.\" class=\"wp-image-163226\"><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Store your backup somewhere secure and separate from your live website. Don&#8217;t restore it without checking for malware, as this could reintroduce the infection.<\/p><h3 class=\"wp-block-heading h-t-title-3\">3. Review recent website changes<\/h3><p class=\"wp-block-paragraph\">Review recent website changes by checking recently modified files, new plugin and theme installations, user activity, and server logs for anything you or your team didn&rsquo;t make. This shows you how the infection started and which areas it affected.<\/p><p class=\"wp-block-paragraph\">Look for these changes in each area:<\/p><ul class=\"wp-block-list\">\n<li><strong>Recently modified files.<\/strong> Look for unexpected changes to WordPress core files, plugins, themes, and configuration files.<\/li>\n\n\n\n<li><strong>Plugin and theme installations.<\/strong> Review plugins or themes that you recently installed or updated.<\/li>\n\n\n\n<li><strong>User activity.<\/strong> Check for newly created administrator accounts, unexpected permission changes, or suspicious login activity.<\/li>\n\n\n\n<li><strong>Server logs.<\/strong> Review available access and error logs for unusual requests, file uploads, or activity around the suspected infection date.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Depending on your hosting environment, use one of the following methods to look for recently modified files:<\/p><h4 class=\"wp-block-heading h-t-title-4\">Linux and macOS (command line\/SSH)<\/h4><p class=\"wp-block-paragraph\">With Secure Shell (SSH) access, navigate to your WordPress installation directory, where <strong>wp-config.php<\/strong> is located, and run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">find . -type f -mtime -7<\/pre><p class=\"wp-block-paragraph\">This command lists files modified in the last seven 24-hour periods, including files in subdirectories.<\/p><p class=\"wp-block-paragraph\">To find files modified within the last 24 hours, use:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">find . -type f -mmin -1440<\/pre><p class=\"wp-block-paragraph\">To look specifically for PHP files modified within the last seven days, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">find . -type f -name \"*.php\" -mtime -7<\/pre><p class=\"wp-block-paragraph\">These commands only list matching files and don&#8217;t modify or delete anything.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Windows (PowerShell)<\/h4><p class=\"wp-block-paragraph\">On a Windows server or a local development environment like XAMPP or WAMP, open PowerShell and go to your WordPress installation directory. For example:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd C:xampphtdocswordpress<\/pre><p class=\"wp-block-paragraph\">Replace this path with the location of your WordPress installation.<\/p><p class=\"wp-block-paragraph\">To find files changed in the last seven days, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Get-ChildItem . -Recurse -File |\n\n&nbsp;&nbsp;&nbsp;&nbsp;Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) }<\/pre><p class=\"wp-block-paragraph\">To find only recently modified PHP files, use:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Get-ChildItem . -Recurse -File -Filter *.php |\n\n&nbsp;&nbsp;&nbsp;&nbsp;Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) }<\/pre><h4 class=\"wp-block-heading h-t-title-4\">Hosting file manager<\/h4><p class=\"wp-block-paragraph\">Without SSH or command-line access to your website, inspect your files through your hosting provider&#8217;s file manager.<\/p><p class=\"wp-block-paragraph\">Log in to your hosting control panel and open <strong>File Manager<\/strong>. Navigate to your WordPress installation directory, often named <strong>public_html<\/strong>.<\/p><p class=\"wp-block-paragraph\">Look for the <strong>Last Modified<\/strong> column or an equivalent option, if your file manager provides one. Sort the files by their modification dates and check for unexpected changes, particularly in <strong>wp-content<\/strong>, <strong>wp-includes<\/strong>, and the WordPress root directory.<\/p><p class=\"wp-block-paragraph\">Recently modified files aren&#8217;t necessarily malicious. Legitimate updates and plugin activity can also modify files. Compare suspicious changes against recent updates or known clean backups before taking action.<\/p><h2 id=\"h-how-to-remove-malware-from-wordpress\" class=\"wp-block-heading h-t-title-2\">How to remove malware from WordPress<\/h2><p class=\"wp-block-paragraph\">Remove WordPress malware by running an automatic malware removal tool, restoring a clean backup, removing malicious code manually, or hiring a professional malware removal service.<\/p><p class=\"wp-block-paragraph\">Choose the best method based on the severity of the infection and your technical experience:<\/p><ol class=\"wp-block-list\">\n<li><strong>Automatic malware removal.<\/strong> Best for beginners who want to detect and clean malicious files using a hosting tool or security plugin.<\/li>\n\n\n\n<li><strong>Restoring a clean backup.<\/strong> Ideal for websites with a reliable backup created before the infection.<\/li>\n\n\n\n<li><strong>Manual malware removal.<\/strong> Suitable for experienced users who need to inspect files, databases, and other compromised components.<\/li>\n\n\n\n<li><strong>Professional malware removal.<\/strong> Best for complex or recurring infections that require specialist assistance.<\/li>\n<\/ol><h3 class=\"wp-block-heading h-t-title-3\">Method 1. Remove WordPress malware automatically<\/h3><p class=\"wp-block-paragraph\">Remove WordPress malware automatically by running a malware scanner from your hosting provider or a WordPress security plugin, which detects and cleans infected files for you. This is usually the easiest option for WordPress beginners.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Using a hosting malware scanner<\/h4><p class=\"wp-block-paragraph\">Use a hosting malware scanner by opening the security section of your hosting control panel and reviewing the scan results for infected files. Server-level scanners detect and remove malicious files without requiring access to the WordPress dashboard.<\/p><p class=\"wp-block-paragraph\">For example, Hostinger&#8217;s <a data-click-id=\"hgr-post-content-link-managed-hosting-for-wordpress\" href=\"\/ng\/wordpress-hosting\" target=\"_blank\" rel=\"noopener\">managed hosting for WordPress<\/a> includes a malware scanner that automatically checks website files for malicious code. It can also clean or remove detected malware, which is useful when an infection prevents you from accessing your dashboard.<\/p><div class=\"wp-block-image\"><figure data-wp-context=\"{&quot;imageId&quot;:&quot;6b0b0b256d390&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6b0b0b256d390\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/image2.png\/w=1024,h=1024,fit=scale-down\" alt=\"Malware Scanner page reporting &quot;Malware found&quot;: 384 infected files in the last 30 days, last scanned 10 hours ago. A bar chart shows infected files per day, peaking on Oct 28, when the malware was first found, and tapering off by Nov 4. Below, the Recommended steps tab lists &quot;Update vulnerable plugins&quot; (Elementor and Elementor Pro) and &quot;Change passwords.&quot; A &quot;Request site cleanup&quot; button sits at the top right.\" class=\"wp-image-163227\"><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Follow these steps if you&rsquo;re using Hostinger:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your Hostinger account and navigate to <strong>Websites &rarr; Manage site<\/strong>.<\/li>\n\n\n\n<li>Select <strong>Security &rarr;<\/strong> <strong>Malware Scanner<\/strong> from the left sidebar.<\/li>\n\n\n\n<li>Review the latest scan results to see whether the scanner detected malicious or compromised files.<\/li>\n\n\n\n<li>When the scanner finds malware, check the <strong>Recommended Steps<\/strong> and <strong>Infected Files<\/strong> sections to see what it detected and cleaned.<\/li>\n\n\n\n<li>Click <strong>Show details<\/strong> to review the affected files and their locations.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Investigate remaining malicious files manually or use any available cleanup options.<\/p><p class=\"wp-block-paragraph\">The malware scanner runs automatically, so you don&#8217;t need to initiate each scan yourself.<\/p><p class=\"wp-block-paragraph\">However, Hostinger&#8217;s malware scanner only scans website files, not the WordPress database. This means that harmful code injected into database records, such as posts or site settings, can stay undetected. Compromised administrator accounts and other persistence mechanisms may also require separate investigation.<\/p><p class=\"wp-block-paragraph\">Inspect the database and other affected areas or consider professional assistance if the infection continues after file cleanup.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Using a WordPress security plugin<\/h4><p class=\"wp-block-paragraph\">Use a WordPress security plugin by installing a scanner like Wordfence from your WordPress dashboard and running a full scan of your installation. This option suits websites whose hosting provider doesn&rsquo;t offer malware scanning.<\/p><p class=\"wp-block-paragraph\">To scan your website with Wordfence:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard and navigate to <strong>Plugins &rarr; Add New Plugin<\/strong>.<\/li>\n\n\n\n<li>Search for <strong>Wordfence Security<\/strong>, then install and activate it.<\/li>\n\n\n\n<li>Navigate to <strong>Wordfence &rarr; Scan<\/strong> and click the <strong>Start New Scan<\/strong> button.<\/li>\n\n\n\n<li>Wait for the scan to finish and review the reported issues.<\/li>\n\n\n\n<li>Use the available repair or deletion options for confirmed malicious files.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Review each finding before making changes to avoid removing legitimate custom code.<\/p><p class=\"wp-block-paragraph\">Wordfence can help identify modified WordPress core files, suspicious code, and other security issues. Wordfence Free receives new malware signatures 30 days after Wordfence Premium, so its scanner can miss malware that requires a new signature to detect.<\/p><p class=\"wp-block-paragraph\">Security plugins also require a working WordPress installation and dashboard access. When your dashboard is inaccessible, a hosting-level scanner, backup restoration, or manual cleanup may be more suitable.<\/p><p class=\"wp-block-paragraph\">After automatic cleanup, scan your website again and check for suspicious redirects, unauthorized content, and unknown administrator accounts. A clean file scan doesn&#8217;t guarantee that every part of the infection has been removed.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Method 2. Restore WordPress from a clean backup<\/h3><p class=\"wp-block-paragraph\">Restore WordPress from a clean backup by selecting a backup created before the infection and restoring both its files and database through your hosting control panel or manually. This can be faster than cleaning individual files. It is particularly useful if the malware has affected multiple parts of your website or you&#8217;re unsure which files are compromised.<\/p><p class=\"wp-block-paragraph\">However, you&#8217;ll need to make sure the backup is clean. Restoring an infected backup could reintroduce the malware, while using an older backup may cause you to lose recent content, orders, or other website changes.<\/p><p class=\"wp-block-paragraph\">To restore your WordPress website:<\/p><ol class=\"wp-block-list\">\n<li><strong>Find a clean backup.<\/strong> Review your available backups and select one created before the suspected infection. Inspect or scan it in an isolated environment before restoring it, if possible.<\/li>\n\n\n\n<li><strong>Restore the files and database.<\/strong> Use your hosting provider&#8217;s backup restoration tool or manually upload the files and import the corresponding database.&nbsp;<\/li>\n\n\n\n<li><strong>Check for missing content.<\/strong> Review any posts, orders, or website changes made after the backup date. Recover legitimate data carefully without reintroducing infected files or database entries.<\/li>\n\n\n\n<li><strong>Verify the restoration.<\/strong> Test important website features, run another malware scan, and check for suspicious redirects, content, and user accounts.<\/li>\n\n\n\n<li><strong>Address the original vulnerability.<\/strong> Update vulnerable software, remove unnecessary plugins and themes, and change compromised credentials to prevent reinfection.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">You can restore available website backups through the Hostinger dashboard if you&rsquo;re using Hostinger. For more information about creating and managing backups, see our guide on how to <a data-click-id=\"hgr-post-content-link-back-up-your-wordpress-site-2\" href=\"\/ng\/tutorials\/backup-wordpress\/\" target=\"_blank\" rel=\"noopener\">back up your WordPress site<\/a>.<\/p><p class=\"wp-block-paragraph\">Keep in mind that restoring a clean backup doesn&#8217;t necessarily remove the vulnerability that caused the infection. You&#8217;ll still need to secure your website and verify that attackers no longer have access.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Method 3. Remove WordPress malware manually<\/h3><p class=\"wp-block-paragraph\">Remove WordPress malware manually by checking and cleaning six areas: WordPress core files, plugins and themes, writable directories, the database, user accounts, and persistence mechanisms.<\/p><p class=\"wp-block-paragraph\">This method is useful when automatic tools aren&#8217;t enough to remove the infection completely or when you need to investigate suspicious changes across your website.<\/p><p class=\"wp-block-paragraph\">Before proceeding, make sure you&#8217;ve preserved a backup and have access to your website files through your hosting file manager, FTP, SSH File Transfer Protocol (SFTP), or SSH.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 1. Check and replace compromised WordPress core files<\/h4><p class=\"wp-block-paragraph\">Check WordPress core files by comparing them against the official WordPress checksums, then replace any modified files with clean copies from WordPress.org. Attackers modify core files to execute malicious code, redirect visitors, or maintain unauthorized access.<\/p><p class=\"wp-block-paragraph\">With SSH access and WordPress Command Line Interface (WP-CLI) installed, navigate to your WordPress root directory and run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp core verify-checksums<\/pre><p class=\"wp-block-paragraph\">This command compares your WordPress core files against the official checksums from WordPress.org and reports unexpected modifications. It can also identify unexpected files in core directories.<\/p><p class=\"wp-block-paragraph\">Investigate any modified or missing files the command reports before making changes, as not every unexpected file is malicious.<\/p><p class=\"wp-block-paragraph\">To replace compromised core files manually:<\/p><ol class=\"wp-block-list\">\n<li>Download a clean version of WordPress from <a data-click-id=\"hgr-post-content-link-wordpress-org\" href=\"https:\/\/wordpress.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.org<\/a>. Choose the version and locale matching your installation when verifying or replacing files.<\/li>\n\n\n\n<li>Extract the downloaded archive on your computer.<\/li>\n\n\n\n<li>Connect to your website using FTP\/SFTP or your hosting provider&#8217;s file manager.<\/li>\n\n\n\n<li>Replace compromised WordPress core files with clean copies. You can replace the <strong>wp-admin<\/strong> and <strong>wp-includes<\/strong> directories entirely, along with affected root-level core files.<\/li>\n\n\n\n<li>Preserve your existing <strong>wp-content<\/strong> directory and <strong>wp-config.php<\/strong> file, as they contain website content, extensions, and configuration settings.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Pay attention to <strong>wp-config.php<\/strong> and <strong>.htaccess<\/strong>, as attackers can also inject malicious code into these files. Inspect them for unexpected changes, but don&#8217;t replace them blindly because they may contain legitimate custom settings.<\/p><p class=\"wp-block-paragraph\">Alternatively, run this WP-CLI command, replacing X.X.X with the WordPress version your site currently uses:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp core download --version=X.X.X --force --skip-content<\/pre><p class=\"wp-block-paragraph\">After replacing the affected files, run the verification command again to confirm that your WordPress core files match the official versions.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 2. Inspect and clean WordPress plugins and themes<\/h4><p class=\"wp-block-paragraph\">Inspect WordPress plugins and themes by verifying their files against official checksums or trusted originals, then replace compromised plugins and themes with clean copies and remove ones you don&rsquo;t use. Outdated plugins and themes, ones from untrusted sources, and ones modified after installation are the most common hiding places for malware.<\/p><p class=\"wp-block-paragraph\">Start by reviewing the plugins and themes installed on your website. Look for unfamiliar plugins or themes, unexpected file changes, or tools you no longer use.<\/p><p class=\"wp-block-paragraph\">You can check the integrity of plugins downloaded from the official WordPress repository using WP-CLI. Run the following command if you have SSH access and WP-CLI installed:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp plugin verify-checksums --all<\/pre><p class=\"wp-block-paragraph\">This command compares supported plugin files with their official checksums and reports unexpected modifications. It checks file integrity, not whether a plugin is secure or free from vulnerabilities.<\/p><p class=\"wp-block-paragraph\">The command also doesn&#8217;t verify premium or custom plugins that aren&#8217;t available in the WordPress.org repository. WP-CLI has no equivalent checksum command for themes, so compare theme files against a fresh download from the developer.<\/p><p class=\"wp-block-paragraph\">Take these steps if you find compromised plugins and themes:<\/p><ol class=\"wp-block-list\">\n<li>Identify the affected plugin or theme and check whether its developer still maintains it.<\/li>\n\n\n\n<li>Download a clean copy from the official WordPress repository or the developer&#8217;s website.<\/li>\n\n\n\n<li>Replace the plugin or theme with the clean version using your hosting file manager or FTP\/SFTP.<\/li>\n\n\n\n<li>Remove unknown, unused, or unsupported plugins and themes.<\/li>\n\n\n\n<li>Test the replaced plugins and themes to confirm that they work correctly.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">For plugins and themes without official checksum verification, compare their files against trusted originals.<\/p><p class=\"wp-block-paragraph\">Also, inspect the <strong>wp-content\/mu-plugins<\/strong> directory. Must-use plugins load automatically and don&#8217;t appear in the regular plugin list in the same way as standard plugins, making them a potential hiding place for malicious code.<\/p><p class=\"wp-block-paragraph\">Deactivating an infected plugin isn&#8217;t necessarily enough to remove the threat. Malicious files or backdoors may remain on the server even when the plugin is inactive.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 3. Inspect the uploads folder and other writable directories<\/h4><p class=\"wp-block-paragraph\">Inspect the <strong>wp-content\/uploads<\/strong> folder and other writable directories for PHP files, unfamiliar filenames, and files disguised as images. The uploads folder is a common target because WordPress uses it to store images, documents, and other media files.<\/p><p class=\"wp-block-paragraph\">Open your hosting file manager or connect to your website using FTP\/SFTP. Navigate to <strong>wp-content\/uploads<\/strong>. With SSH access, you can use the following command from your WordPress root directory to list PHP files in the uploads folder:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">find wp-content\/uploads -type f -iname \"*.php\"<\/pre><p class=\"wp-block-paragraph\">This command doesn&#8217;t delete anything. It only lists matching files for investigation.<\/p><p class=\"wp-block-paragraph\">PHP files in the uploads directory may be suspicious, but some plugins can create legitimate files there. Don&#8217;t delete them without checking their purpose.<\/p><p class=\"wp-block-paragraph\">Compare suspicious files against a known clean backup or inspect them using a reputable malware scanner. Remove confirmed malicious files and investigate how attackers uploaded them.<\/p><p class=\"wp-block-paragraph\">Also, inspect other writable locations, including <strong>wp-content\/cache<\/strong>, temporary directories, and custom upload folders used by your plugins.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 4. Check the WordPress database for malicious content<\/h4><p class=\"wp-block-paragraph\">Check the WordPress database for malicious content by searching tables like <strong>wp_posts<\/strong> and <strong>wp_options<\/strong> for injected scripts, spam links, and unfamiliar URLs using phpMyAdmin or WP-CLI.<\/p><p class=\"wp-block-paragraph\">These infections can remain even after you&#8217;ve cleaned your website files, particularly if your malware scanner only checks file-based threats.<\/p><p class=\"wp-block-paragraph\">Start by checking these common locations:<\/p><ul class=\"wp-block-list\">\n<li><strong>wp_posts.<\/strong> Malicious scripts, spam links, or unauthorized content injected into posts and pages.<\/li>\n\n\n\n<li><strong>wp_options.<\/strong> Suspicious site settings, injected scripts, or unexpected changes to stored URLs and other options.<\/li>\n\n\n\n<li><strong>wp_postmeta.<\/strong> Malicious code or links stored in custom fields and page builder data.<\/li>\n\n\n\n<li><strong>wp_comments.<\/strong> Spam links or injected content in comments.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Your database tables may use a different prefix instead of <strong>wp_<\/strong>.<\/p><p class=\"wp-block-paragraph\">WP-CLI also lets you search the database for suspicious patterns. For example, the following command looks for references to the HTML &lt;script&gt; tag:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp db search '&lt;script' --all-tables-with-prefix<\/pre><p class=\"wp-block-paragraph\">This command only searches for matching content and doesn&#8217;t modify the database.<\/p><p class=\"wp-block-paragraph\">However, legitimate plugins, themes, and page builders may also store JavaScript in database records. A matching result doesn&#8217;t automatically mean the content is malicious.<\/p><p class=\"wp-block-paragraph\">Review suspicious records, check unfamiliar domains or scripts, and compare the content against a known clean backup before removing anything.<\/p><p class=\"wp-block-paragraph\">Take these steps if you confirm malicious database entries:<\/p><ol class=\"wp-block-list\">\n<li>Export a fresh copy of the database before making changes.<\/li>\n\n\n\n<li>Identify the affected records and determine which content is malicious.<\/li>\n\n\n\n<li>Remove the injected content or restore affected records from a known clean backup.<\/li>\n\n\n\n<li>Check related records for additional malicious code.<\/li>\n\n\n\n<li>Test your website to confirm that the changes haven&#8217;t affected legitimate content or functionality.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Avoid deleting entire database tables or performing unrestricted search-and-replace operations. Some WordPress settings and plugin data use serialized formats that can break if modified incorrectly.<\/p><p class=\"wp-block-paragraph\">After cleaning the database, check whether the malicious content or redirects have disappeared. A hidden backdoor or compromised account may still be present when the infection returns.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 5. Remove unauthorized users and hidden backdoors<\/h4><p class=\"wp-block-paragraph\">Remove unauthorized users by deleting unfamiliar administrator accounts under <strong>Users &rarr; All Users<\/strong>, then remove hidden backdoors by deleting or replacing files that contain unfamiliar or obfuscated code. Attackers use these accounts and backdoors to maintain access and reinfect your website after cleanup.<\/p><p class=\"wp-block-paragraph\">Start by reviewing your WordPress user accounts:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard and navigate to <strong>Users &rarr; All Users<\/strong>.<\/li>\n\n\n\n<li>Filter the list by the <strong>Administrator<\/strong> role and look for unfamiliar accounts.<\/li>\n\n\n\n<li>Check available activity logs for unexpected account creation or permission changes.<\/li>\n\n\n\n<li>Remove confirmed unauthorized accounts. Reassign any legitimate content an account owns to a trusted user before deleting it.<\/li>\n\n\n\n<li>Review the permissions of remaining users and remove unnecessary administrator privileges.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">Without WordPress dashboard access, you can list administrator accounts with WP-CLI over SSH:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp user list --role=administrator<\/pre><p class=\"wp-block-paragraph\">Next, check for hidden backdoors in your website files. These malicious scripts allow attackers to regain access without using a normal WordPress login.<\/p><p class=\"wp-block-paragraph\">Common hiding places include <strong>wp-config.php<\/strong>, <strong>.htaccess<\/strong>, plugin and theme directories, and writable folders such as <strong>wp-content\/uploads<\/strong>.<\/p><p class=\"wp-block-paragraph\">Look for unfamiliar PHP files, unexpected code added to existing files, or suspicious scripts that don&#8217;t belong to your installed software. Attackers may also use obfuscated code to make backdoors harder to recognize.<\/p><p class=\"wp-block-paragraph\">However, PHP functions such as <strong>eval()<\/strong>, <strong>base64_decode(),<\/strong> and <strong>gzinflate()<\/strong> aren&#8217;t automatically malicious. Legitimate software may use them, so compare suspicious code against trusted originals before removing it.<\/p><p class=\"wp-block-paragraph\">Delete confirmed backdoors or replace compromised files with clean copies. Also, review hosting, FTP\/SFTP, and SSH accounts for unauthorized access.<\/p><p class=\"wp-block-paragraph\">Removing unauthorized users and backdoors is essential, but you&#8217;ll also need to investigate how attackers created them. Otherwise, they may regain access through compromised credentials or unresolved vulnerabilities.<\/p><h4 class=\"wp-block-heading h-t-title-4\">Step 6. Check for malware persistence mechanisms<\/h4><p class=\"wp-block-paragraph\">Check for malware persistence mechanisms by reviewing WordPress cron events, server-level cron jobs, must-use plugins, and configuration files like <strong>.htaccess<\/strong> and <strong>.user.ini<\/strong>. These mechanisms let malware reinstall itself after you remove the infected files.<\/p><p class=\"wp-block-paragraph\">Look for these warning signs in each area:<\/p><ul class=\"wp-block-list\">\n<li><strong>WordPress cron jobs.<\/strong> Unexpected scheduled tasks may recreate malicious files or inject database content.<\/li>\n\n\n\n<li><strong>Server-level cron jobs.<\/strong> Malicious commands can run independently of WordPress.<\/li>\n\n\n\n<li><strong>Automatically loaded code.<\/strong> Attackers may use must-use plugins or the PHP auto_prepend_file directive to execute scripts.<\/li>\n\n\n\n<li><strong>Modified configuration files.<\/strong> Unexpected changes to <strong>.htaccess<\/strong>, <strong>.user.ini<\/strong>, or server settings can trigger malicious behavior.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">To list scheduled WordPress cron events with WP-CLI, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wp cron event list<\/pre><p class=\"wp-block-paragraph\">Review the results for unfamiliar event names or unexpected scheduled actions. Legitimate plugins also create cron events, so investigate suspicious entries before removing them.<\/p><p class=\"wp-block-paragraph\">To inspect server-level cron jobs for your current user, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">crontab -l<\/pre><p class=\"wp-block-paragraph\">Without SSH access, check for scheduled tasks in your hosting control panel. In the Hostinger dashboard, go to <strong>Advanced &rarr; Cron Jobs<\/strong>.<\/p><p class=\"wp-block-paragraph\">When you identify a confirmed malicious scheduled task, remove it and clean the associated scripts or database entries. Otherwise, the task or its underlying code may recreate the infection.<\/p><p class=\"wp-block-paragraph\">Also, review unexpected PHP auto-prepend settings or other mechanisms that load scripts automatically. These can allow malicious code to execute even after the original infected file has been removed.<\/p><p class=\"wp-block-paragraph\">Once you&#8217;ve removed the identified persistence mechanisms, repeat your malware scans and check for recurring suspicious activity.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Method 4. Use a professional WordPress malware removal service<\/h3><p class=\"wp-block-paragraph\">Use a professional WordPress malware removal service when automatic scanning, backup restoration, or manual cleanup doesn&rsquo;t fully remove the infection.<\/p><p class=\"wp-block-paragraph\">Professional assistance is particularly useful when malware returns, the database contains malicious code, or hidden backdoors make it difficult to identify the full extent of the compromise.<\/p><p class=\"wp-block-paragraph\">A reliable malware removal service should investigate and clean the entire website, including infected files, database records, unauthorized user accounts, and persistence mechanisms. It should also help identify the original security weakness and verify the cleanup.<\/p><p class=\"wp-block-paragraph\">Hostinger offers a site cleanup service for WordPress websites hosted at Hostinger with the domain pointed to Hostinger. The service removes malicious files, cleans MySQL injections, stops malicious scripts, and includes a security review. To order it, click Request site cleanup in the malware scanner.<\/p><div class=\"wp-block-image\"><figure data-wp-context=\"{&quot;imageId&quot;:&quot;6b0b0b25731f7&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6b0b0b25731f7\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/image3.png\/w=1024,h=1024,fit=scale-down\" alt=\"Top of the Malware Scanner page with the breadcrumb &quot;Websites - domain.tld - Security - Malware Scanner.&quot; A red arrow points to the purple &quot;Request site cleanup&quot; button. Below it are two cards, &quot;Discovered&quot; (last scan 13 hours ago) and &quot;Actions taken.&quot;\" class=\"wp-image-163228\"><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">On another hosting provider, contact its security team or hire a WordPress malware removal specialist.<\/p><p class=\"wp-block-paragraph\">Before choosing a service, check whether it includes database inspection, backdoor removal, vulnerability assessment, and post-cleanup verification.<\/p><h2 id=\"h-what-to-do-after-removing-wordpress-malware\" class=\"wp-block-heading h-t-title-2\">What to do after removing WordPress malware<\/h2><p class=\"wp-block-paragraph\">After removing malware from your site, secure any compromised access points, address the vulnerabilities that caused the infection, and verify that no malicious content remains.<\/p><h3 class=\"wp-block-heading h-t-title-3\">1. Change passwords and invalidate compromised sessions<\/h3><p class=\"wp-block-paragraph\">Change the passwords for every potentially compromised account and invalidate existing sessions by regenerating your WordPress authentication keys and salts. Attackers may have obtained login credentials during the infection, allowing them to regain access even after you&#8217;ve removed the malware.<\/p><p class=\"wp-block-paragraph\">Prioritize these account types:<\/p><ul class=\"wp-block-list\">\n<li>WordPress administrator accounts<\/li>\n\n\n\n<li>Hosting control panel accounts<\/li>\n\n\n\n<li>FTP\/SFTP and SSH accounts<\/li>\n\n\n\n<li>Database users<\/li>\n\n\n\n<li>Application passwords<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Use strong, unique passwords for each account and enable two-factor authentication (2FA) wherever available.<\/p><p class=\"wp-block-paragraph\">To regenerate the keys, create new values with the <a data-click-id=\"hgr-post-content-link-official-wordpress-secret-key-service\" href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\" target=\"_blank\" rel=\"noreferrer noopener\">official WordPress secret key service<\/a> and replace the existing ones in your <strong>wp-config.php<\/strong> file.<\/p><p class=\"wp-block-paragraph\">Changing these keys invalidates existing WordPress authentication cookies and forces users to log in again. This helps prevent attackers from reusing previously authenticated sessions.<\/p><h3 class=\"wp-block-heading h-t-title-3\">2. Update WordPress, themes, and plugins<\/h3><p class=\"wp-block-paragraph\">Update WordPress core, themes, and plugins to their latest stable versions, and remove plugins and themes you no longer use. Outdated or vulnerable software is often the entry point for malware.<\/p><p class=\"wp-block-paragraph\">Before updating, create a fresh backup and check that your theme and plugins are compatible with the new versions. Then go to <strong>Dashboard &rarr; Updates<\/strong> in your WordPress admin area and complete the following:<\/p><ol class=\"wp-block-list\">\n<li>Update WordPress core.<\/li>\n\n\n\n<li>Update installed plugins and themes on the same screen.<\/li>\n\n\n\n<li>Remove unused, abandoned, or vulnerable plugins and themes.<\/li>\n\n\n\n<li>Check that your hosting environment uses a supported PHP version.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">For detailed instructions, see our guide on how to <a data-click-id=\"hgr-post-content-link-update-wordpress\" href=\"\/ng\/tutorials\/how-to-update-wordpress\/\">update WordPress<\/a>.<\/p><p class=\"wp-block-paragraph\">Updating software doesn&#8217;t automatically remove malware or resolve compromised accounts. Make sure you&#8217;ve completed the cleanup before moving on to verification.<\/p><h3 class=\"wp-block-heading h-t-title-3\">3. Scan your website again and verify the cleanup<\/h3><p class=\"wp-block-paragraph\">After securing your website, run another malware scan to check for remaining threats. Inspect the database and other potentially compromised areas separately when your scanner only checks website files.<\/p><p class=\"wp-block-paragraph\">At the very least, verify that:<\/p><ul class=\"wp-block-list\">\n<li>Visitors are no longer redirected to suspicious websites.<\/li>\n\n\n\n<li>Unauthorized pages, spam links, and injected scripts are gone.<\/li>\n\n\n\n<li>Unknown administrator accounts and suspicious scheduled tasks have been removed.<\/li>\n\n\n\n<li>Important pages, forms, and other website features work correctly.<\/li>\n\n\n\n<li>No new malicious files or unexpected changes appear after cleanup.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Open the Security issues report in <a data-click-id=\"hgr-post-content-link-google-search-console\" href=\"https:\/\/search.google.com\/search-console\/about\" target=\"_blank\" rel=\"noreferrer noopener\">Google Search Console<\/a> to check whether Google has flagged your website as unsafe.<\/p><div class=\"wp-block-image\"><figure data-wp-context=\"{&quot;imageId&quot;:&quot;6b0b0b257e826&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6b0b0b257e826\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/image4.png\/w=1024,h=1024,fit=scale-down\" alt=\"Security issues panel showing a green checkmark next to the message &quot;No issues detected.&quot;\" class=\"wp-image-163230\"><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">Request a review in Google Search Console after fixing all reported issues. Allow a few days for Google to review your site. Warnings in Chrome and Google Search should clear within 72 hours of approval.<\/p><p class=\"wp-block-paragraph\">Continue monitoring your website over the following days for unexpected file changes, suspicious logins, or recurring malware alerts.<\/p><h2 id=\"h-why-does-wordpress-malware-keep-coming-back\" class=\"wp-block-heading h-t-title-2\">Why does WordPress malware keep coming back?<\/h2><p class=\"wp-block-paragraph\">WordPress malware keeps coming back when part of the infection remains after cleanup or the security vulnerability that allowed attackers to access your website hasn&#8217;t been fixed. Several common causes can lead to reinfection:<\/p><ul class=\"wp-block-list\">\n<li><strong>Hidden backdoors.<\/strong> Malicious scripts or scheduled tasks recreate infected files after deletion.<\/li>\n\n\n\n<li><strong>Database infections.<\/strong> Injected scripts or malicious settings remain even after file cleanup.<\/li>\n\n\n\n<li><strong>Unauthorized administrator accounts.<\/strong> Attackers use hidden or compromised accounts to reinstall malware.<\/li>\n\n\n\n<li><strong>Compromised credentials.<\/strong> Stolen login details allow attackers to regain access.<\/li>\n\n\n\n<li><strong>Vulnerable plugins and themes.<\/strong> Unpatched extensions expose the same entry point that caused the original infection.<\/li>\n\n\n\n<li><strong>Other persistence mechanisms.<\/strong> Modified configuration files or automatically loaded scripts repeatedly execute malicious code.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Review these areas to investigate how the attacker initially gained access. Compare affected files against clean versions, inspect the database, and check for suspicious account activity.<\/p><p class=\"wp-block-paragraph\">Avoid repeatedly deleting the same malicious files without identifying what&#8217;s recreating them.<\/p><p class=\"wp-block-paragraph\">Consider a professional malware removal service when you can&#8217;t confidently remove the entire infection. Hostinger&#8217;s site cleanup service is available for eligible WordPress websites, or you can hire a qualified WordPress security specialist.<\/p><h2 id=\"h-how-to-prevent-wordpress-malware-infections\" class=\"wp-block-heading h-t-title-2\">How to prevent WordPress malware infections<\/h2><p class=\"wp-block-paragraph\">You can prevent WordPress malware infections by keeping WordPress core, plugins, and themes updated, securing user accounts, and regularly monitoring your website for suspicious activity. These security practices reduce vulnerabilities and help you detect potential threats before they cause significant damage.<\/p><p class=\"wp-block-paragraph\">Here are some essential practices to follow:<\/p><ul class=\"wp-block-list\">\n<li>Regularly update WordPress core, plugins, and themes to patch known security vulnerabilities.<\/li>\n\n\n\n<li>Use strong, unique passwords, enable two-factor authentication, and limit administrator access to only trusted users.<\/li>\n\n\n\n<li>Schedule automatic backups and store copies separately from your live website.<\/li>\n\n\n\n<li>Use a reputable security plugin or hosting-level malware scanner to detect suspicious changes early.<\/li>\n\n\n\n<li>Delete unused or unsupported plugins and themes, and install new ones only from trusted sources.<\/li>\n\n\n\n<li>Review website file and directory permissions to limit unauthorized changes.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">For more detailed instructions, see our guide on how to <a data-click-id=\"hgr-post-content-link-secure-your-wordpress-site\" href=\"\/ng\/tutorials\/how-to-secure-wordpress\/\" target=\"_blank\" rel=\"noopener\">secure your WordPress site<\/a>. You can also follow our <a data-click-id=\"hgr-post-content-link-wordpress-security-checklist\" href=\"\/ng\/tutorials\/wordpress-security-checklist\/\" target=\"_blank\" rel=\"noopener\">WordPress security checklist<\/a> to maintain your website&#8217;s security over time.<\/p><p class=\"wp-block-paragraph\">Hostinger&rsquo;s Managed hosting for WordPress scans your files for malware automatically and removes infected files without wp-admin access. That built-in protection reduces manual work around malware prevention.<\/p><h2 id=\"h-key-takeaways-for-wordpress-malware-removal\" class=\"wp-block-heading h-t-title-2\">Key takeaways for WordPress malware removal<\/h2><p class=\"wp-block-paragraph\">WordPress malware removal follows five stages: detect, contain, clean, verify, and prevent reinfection. Skipping any of them leaves a path for the infection to return.<\/p><p class=\"wp-block-paragraph\">Depending on the severity of the infection and your technical experience, you can use an automatic malware scanner, restore a clean backup, remove the malware manually, or seek professional assistance.<\/p><p class=\"wp-block-paragraph\">After cleanup, change compromised credentials, update vulnerable software, and scan your website again to confirm that the infection is gone. Addressing the original security weakness will help prevent similar infections in the future.<\/p><p class=\"wp-block-paragraph\">Keep monitoring file changes, login activity, and scanner alerts for several weeks after cleanup. Alerts that keep coming back usually point to a missed backdoor or an unpatched entry point rather than a new attack.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To remove WordPress malware, you&rsquo;ll need to delete suspicious files and then check for malicious code hiding in your database, plugins, themes, or other website files, as well as compromised user accounts. Otherwise, the infection might return even after a malware scan appears clean. You might be dealing with a malware infection if you notice [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/wordpress-malware-removal\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":156000,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Remove WordPress Malware and Clean Your Website","rank_math_description":"Check out this article to learn how to remove WordPress malware, from backup creation to infected file detection and WordPress updates.","rank_math_focus_keyword":"remove wordpress malware","_content_updated_date":"2026-11-27","footnotes":""},"categories":[22673],"tags":[],"class_list":["post-713","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/wordpress-malware-removal","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/remover-malware-wordpress\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/supprimer-malware-wordpress\/","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/eliminar-malware-wordpress\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-mengatasi-malware-di-wordpress\/","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/wordpress-malware-removal","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/wordpress-malware-removal","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/eliminar-malware-wordpress\/","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/eliminar-malware-wordpress\/","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/eliminar-malware-wordpress\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/remover-malware-wordpress\/","default":0},{"locale":"de-DE","link":"https:\/\/www.hostinger.com\/de\/tutorials\/wordpress-malware-entfernen","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=713"}],"version-history":[{"count":73,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/713\/revisions"}],"predecessor-version":[{"id":155999,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/713\/revisions\/155999"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/156000"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}