{"id":26962,"date":"2026-01-07T10:13:00","date_gmt":"2026-01-07T09:13:00","guid":{"rendered":"https:\/\/contabo.com\/blog\/?p=26962"},"modified":"2026-01-08T12:57:15","modified_gmt":"2026-01-08T11:57:15","slug":"wordpress-hacked","status":"publish","type":"post","link":"https:\/\/contabo.com\/blog\/wordpress-hacked\/","title":{"rendered":"WordPress Hacked? Detect, Recover &amp; Prevent"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp\" alt=\"WordPress Hacked? Detect, Recover &amp; Prevent (Title image)\" class=\"wp-image-27042\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp 1200w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked-600x315.webp 600w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked-768x403.webp 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Most owners are shocked&nbsp;to find&nbsp;their WordPress&nbsp;hacked. Your site works fine one day. Next, visitors see warnings, traffic drops, or you notice admin accounts that you&nbsp;don&#8217;t&nbsp;recognize. The good news is that recovery is easy if you act quickly and know what to do.&nbsp;<\/p>\n\n\n\n<p>This guide shows you how to spot the warning signs&nbsp;for a hacked WordPress,&nbsp;contain&nbsp;the infection, get rid of malware completely, and make your hacked WordPress site more&nbsp;secure&nbsp;so it&nbsp;doesn&#8217;t&nbsp;happen again. Every step can be taken, whether you do the cleaning yourself or hire someone else to do it.&nbsp;Let&#8217;s&nbsp;get started.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-a7474a3c\"><h2 class=\"uagb-heading-text\">Signs Your WordPress Site Has Been Hacked&nbsp;<\/h2><\/div>\n\n\n\n<p>Catching a&nbsp;hacked&nbsp;WordPress website&nbsp;early makes the difference between a quick cleanup and a complete site rebuild. Most attacks&nbsp;don&#8217;t&nbsp;announce themselves with a defaced homepage. Instead, they&nbsp;operate&nbsp;quietly in the background, siphoning traffic or using your server to attack other sites.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-0d624f35\"><h3 class=\"uagb-heading-text\">Unexpected Redirects and Pop-ups&nbsp;<\/h3><\/div>\n\n\n\n<p>You go to your homepage and end up on a completely different site, which usually sells fake goods or worse. Sometimes the redirect only works for people who&nbsp;aren&#8217;t&nbsp;logged in, so you&nbsp;won&#8217;t&nbsp;see it when&nbsp;you&#8217;re&nbsp;logged into your admin panel. From a different device, open your site in an incognito window. If it takes you to strange URLs, especially pharmaceutical spam or adult sites,&nbsp;that&#8217;s&nbsp;a clear sign that your WordPress site has been hacked.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Pop-ups that show up out of nowhere, especially ones you&nbsp;didn&#8217;t&nbsp;ask for, are a sign of the same problem. Attackers put JavaScript into your site to show these ads and make money&nbsp;off of&nbsp;your visitors.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-c8762848\"><h3 class=\"uagb-heading-text\">Warnings from Google Safe Browsing&nbsp;&nbsp;<\/h3><\/div>\n\n\n\n<p>When Google flags your site, search results will say things like &#8220;This site may be hacked&#8221; or &#8220;This site may harm your computer.&#8221; Chrome and other browsers might even block visitors completely with a full-page warning.&nbsp;Check&nbsp;Google Search Console. If you see security&nbsp;issue&nbsp;alerts there, it means Google has found malware or something else that looks suspicious.&nbsp;&nbsp;<\/p>\n\n\n\n<p>When this happens, your search traffic goes away overnight. It takes time to be taken&nbsp;off of&nbsp;blacklists even after cleaning up. The sooner you act, the less damage your SEO will&nbsp;suffer.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-a52eb2b7\"><h3 class=\"uagb-heading-text\">Suspicious Admin Users&nbsp;<\/h3><\/div>\n\n\n\n<p>To see&nbsp;all of&nbsp;your users, log into your WordPress dashboard and go to All Users. Check for accounts you&nbsp;didn&#8217;t&nbsp;make or know about, especially ones that have Administrator rights. Hackers make backdoor admin accounts on a WordPress&nbsp;site&nbsp;so they can get back in even after you change your passwords. A lot of the time, these fake accounts have generic usernames like &#8220;admin2,&#8221; &#8220;support,&#8221; or strings of random characters. Delete any accounts that&nbsp;aren&#8217;t&nbsp;yours right&nbsp;away, but&nbsp;remember that this is just one sign of malware; you need to get rid of the real malware too.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-7a1028f3\"><h3 class=\"uagb-heading-text\">Modified Website Content&nbsp;<\/h3><\/div>\n\n\n\n<p>If your pages and posts change,&nbsp;it&#8217;s&nbsp;a good sign that your WordPress site has been hacked. Attackers could put hidden links in your content that send visitors to dangerous pages, or they could rewrite whole pages to damage your site or send a message. Unlike sudden redirects, content changes often go unnoticed at first because they look like real posts.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Look over your most recent posts and pages for any text, links, or formatting that you&nbsp;didn&#8217;t&nbsp;add. Look closely at the bottom of old posts, where attackers often put in hidden affiliate links or bad redirects. If you think someone has messed with your hacked WordPress site,&nbsp;check&nbsp;your post revision history (click the post, then scroll down to &#8220;Revisions&#8221;) to see what changed and when. If you see any changes that you&nbsp;don&#8217;t&nbsp;remember making,&nbsp;it&#8217;s&nbsp;a sign that someone else has been changing your content.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-d3b93f80\"><h2 class=\"uagb-heading-text\">Immediate Containment Checklist&nbsp;<\/h2><\/div>\n\n\n\n<p>When you find out that your site is really hacked, time is of the essence&nbsp;for the WordPress hack recovery. These first steps help keep the damage to a minimum while you get ready for a full&nbsp;WordPress hack&nbsp;cleanup.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-545695f4\"><h3 class=\"uagb-heading-text\">Enable Maintenance Mode Immediately&nbsp;<\/h3><\/div>\n\n\n\n<p>To stop the public from getting in, turn on maintenance mode. This keeps malware from spreading to visitors and stops more damage to your SEO. You can use a plugin like WP Maintenance Mode or ask your hosting company to send traffic to a different site while you&nbsp;fix the hacked WordPress site.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-becaa620\"><h3 class=\"uagb-heading-text\">Change All&nbsp;Of&nbsp;Your Passwords&nbsp;<\/h3><\/div>\n\n\n\n<p>Change passwords for these accounts&nbsp;immediately:&nbsp;<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>WordPress admin accounts (all of them)&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Hosting control panel (cPanel, Plesk, etc.)&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>FTP\/SFTP accounts&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Database user&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Email accounts tied to your domain&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>Use a password manager like 1Password or&nbsp;Bitwarden&nbsp;to make strong, one-of-a-kind passwords that are at least 16 characters long and have a mix of letters, numbers, and symbols. Attackers can often get in by using weak passwords, and once they have your credentials,&nbsp;they&#8217;ll&nbsp;try them everywhere.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-694adf1a\"><h3 class=\"uagb-heading-text\">Remove Unauthorized Admin Users&nbsp;<\/h3><\/div>\n\n\n\n<p>To see&nbsp;all of&nbsp;your users, log into your WordPress dashboard and click on Users. Look for accounts that you&nbsp;didn&#8217;t&nbsp;make, especially ones that have Administrator rights. If you see any accounts that look suspicious, hover over them and&nbsp;delete&nbsp;them right away. This stops attackers from keeping their backdoor access while you&nbsp;fix your hacked WordPress site.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-77c5e2b7\"><h3 class=\"uagb-heading-text\">Deactivate All Plugins and Themes&nbsp;<\/h3><\/div>\n\n\n\n<p>Go to Plugins and turn off&nbsp;all of&nbsp;the plugins. Next, go to Appearance &gt; Themes and choose a default WordPress theme, such as Twenty Twenty-Four. This keeps&nbsp;possible weaknesses&nbsp;separate while you&nbsp;look into&nbsp;which extensions might be at risk. To find out where the infection came from, turn them back on one at a time during&nbsp;the WordPress hack&nbsp;cleanup.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-a87f0cfd\"><h3 class=\"uagb-heading-text\">Document Everything Before You Start&nbsp;<\/h3><\/div>\n\n\n\n<p>Take&nbsp;screenshots of any errors, defacements, or strange activity. Write down when you first saw the problem. If you have a security plugin, look at the activity logs for your WordPress admin. This documentation shows you the entry point and helps you figure out how the WordPress hack recovery process should go. It also keeps you from getting infected again.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Even though your&nbsp;site&nbsp;files are infected, you can still use your FTP client to download a full backup of them. Use the Export function in phpMyAdmin to download your database. Put these hacked copies in a different place. They might help you understand the attack, but you should never&nbsp;restore from&nbsp;them.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-c9653e92\"><h2 class=\"uagb-heading-text\">Why WordPress Sites Get Hacked (Common Attack Types)&nbsp;<\/h2><\/div>\n\n\n\n<p>Knowing what kinds of attacks are common can help you stop WordPress hacks from happening again. Most hacks&nbsp;aren&#8217;t&nbsp;very complicated;&nbsp;they&#8217;re&nbsp;just automated bots looking for known holes in millions of sites.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-d1a0db0a\"><h3 class=\"uagb-heading-text\">Brute Force Login Attacks&nbsp;<\/h3><\/div>\n\n\n\n<p>WordPress hacker bots try thousands of different username\/password pairs against wp-login.php&nbsp;until they get the right one. They go after common usernames like &#8220;admin&#8221; and use lists of leaked passwords from other breaches. People reuse passwords and stick with defaults, which makes these attacks work.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-0cce17a3\"><h3 class=\"uagb-heading-text\">Outdated Plugins and Themes&nbsp;<\/h3><\/div>\n\n\n\n<p>A lot of WordPress security holes are in plugins, not in WordPress itself. When developers find a security hole, they release an update. But that same announcement tells&nbsp;WordPress&nbsp;hackers exactly what to look for on sites that&nbsp;haven&#8217;t&nbsp;updated&nbsp;yet.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The worst offenders are plugins that have been left behind.&nbsp;It&#8217;s&nbsp;likely that a plugin&nbsp;has&nbsp;a lot of unpatched security holes if it&nbsp;hasn&#8217;t&nbsp;been updated in more than two years. People who&nbsp;cracked&nbsp;nulled (pirated) premium plugins often&nbsp;put in&nbsp;backdoors on purpose.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-92c18a28\"><h3 class=\"uagb-heading-text\">Weaknesses&nbsp;in&nbsp;SQL Injection&nbsp;<\/h3><\/div>\n\n\n\n<p>Poorly coded plugins&nbsp;don&#8217;t&nbsp;sanitize database queries properly. Attackers inject malicious SQL commands through form fields, URL parameters, or search boxes. If successful, they can extract your entire database, create new admin users, or&nbsp;modify&nbsp;your site&#8217;s content.&nbsp;<\/p>\n\n\n\n<p>Modern WordPress uses prepared statements to prevent this, but third-party plugins might not follow best practices. This is why code quality matters when choosing extensions&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-978b0587\"><h3 class=\"uagb-heading-text\">Cross-Site Scripting (XSS)&nbsp;<\/h3><\/div>\n\n\n\n<p>XSS attacks use comment forms, user profiles, or any field that shows user input without proper filtering to add JavaScript to your site. This bad code then runs in the browsers of people who visit the site, which could steal session cookies or send them to&nbsp;phishing&nbsp;sites.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Stored XSS is especially dangerous because the bad script is saved in your database and affects everyone who sees that content.&nbsp;<a href=\"https:\/\/www.wordfence.com\/blog\/2025\/04\/2024-annual-wordpress-security-report-by-wordfence\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Wordfence&#8217;s&nbsp;WordPress Annual Security Report<\/a>&nbsp;says that XSS was the most common type of vulnerability in 2024, making up about half of all WordPress vulnerabilities that were made public.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-9ee3c381\"><h3 class=\"uagb-heading-text\">File Upload Exploits&nbsp;<\/h3><\/div>\n\n\n\n<p>Attackers can upload PHP backdoors that look like images when upload forms&nbsp;don&#8217;t&nbsp;check file types correctly. A file with the name &#8220;photo.jpg.php&#8221; might get past basic checks. After the attacker uploads the file to a public directory, they ask for it directly, and it runs on your server, giving them full control.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-57b92cff\"><h2 class=\"uagb-heading-text\">Step-by-Step: How to Clean a Hacked WordPress Site&nbsp;<\/h2><\/div>\n\n\n\n<p>Manual cleanup requires technical confidence, but&nbsp;it&#8217;s&nbsp;the most thorough approach. Follow these steps in&nbsp;order&nbsp;on how&nbsp;to clean a hacked WordPress site&nbsp;and&nbsp;you\u2019ll&nbsp;be right as rain in no time.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-51df9904\"><h3 class=\"uagb-heading-text\">Scan and Identify WordPress Malware&nbsp;<\/h3><\/div>\n\n\n\n<p>Before removing anything,&nbsp;identify&nbsp;all infected files. Install a security plugin like&nbsp;Wordfence&nbsp;Security (free version works) if your dashboard is still accessible. Run a full scan and review the results carefully.&nbsp;Wordfence&nbsp;compares your files against clean versions from the WordPress repository and flags anything that&nbsp;doesn&#8217;t&nbsp;match.&nbsp;<\/p>\n\n\n\n<p>A WordPress virus often hides in places&nbsp;initial&nbsp;scans&nbsp;miss. Download&nbsp;Sucuri&#8217;s&nbsp;free&nbsp;SiteCheck&nbsp;scanner or&nbsp;VirusTotal&nbsp;to get a second opinion. Look for base64-encoded strings,&nbsp;eval()&nbsp;functions, and&nbsp;suspiciously named files in core directories. When you find a clean WordPress malware scan result,&nbsp;you&#8217;re&nbsp;ready to move to removal.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-0f947580\"><h3 class=\"uagb-heading-text\">Remove Malicious Users, Backdoors, and Files&nbsp;<\/h3><\/div>\n\n\n\n<p>To remove malware from WordPress, first connect via SFTP (FileZilla or similar). Go to wp-content\/uploads\/ and search for .php files. In a typical WordPress setup, uploads should not contain executable PHP, so treat any .php files there as suspicious if you want to remove WordPress malware. If you want to be safe, download a copy for review, then delete them.<\/p>\n\n\n\n<p>Next, replace WordPress core files:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Delete&nbsp;\/wp-admin\/&nbsp;and&nbsp;\/wp-includes\/&nbsp;completely&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download a clean WordPress copy from WordPress.org&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Upload fresh&nbsp;wp-admin\/&nbsp;and&nbsp;wp-includes\/&nbsp;folders&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Overwrite the root core files (for example&nbsp;wp-login.php,&nbsp;wp-load.php,&nbsp;wp-settings.php)&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do not overwrite&nbsp;wp-config.php&nbsp;or anything in&nbsp;wp-content\/&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Finally, review&nbsp;wp-config.php&nbsp;and&nbsp;.htaccess&nbsp;for unexpected code. Remove anything suspicious or obfuscated, especially&nbsp;base64_decode,&nbsp;eval,&nbsp;gzinflate, or unusual&nbsp;include&nbsp;statements that do not belong in a config file&nbsp;to clean the hacked WordPress site.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-ef969b46\"><h3 class=\"uagb-heading-text\">Update Plugins, Themes, and Core&nbsp;<\/h3><\/div>\n\n\n\n<p>Once&nbsp;you\u2019ve&nbsp;replaced compromised files, update everything to the latest versions&nbsp;immediately. Most WordPress hacks start with an outdated plugin, theme, or core install. Log into your dashboard and go to Dashboard \u2192 Updates.&nbsp;<\/p>\n\n\n\n<p>If WordPress offers a newer version, update it. To refresh your existing core files without changing versions, click Re-install Now. This&nbsp;updates&nbsp;WordPress core files with clean copies and can remove modified system files without touching your content in&nbsp;wp-content&nbsp;or your database.&nbsp;<\/p>\n\n\n\n<p>Update&nbsp;WordPress plugins&nbsp;individually. If&nbsp;you\u2019re&nbsp;unsure whether you still need a plugin, remove it. Fewer plugins&nbsp;means&nbsp;fewer attack surfaces. For themes, update WordPress themes&nbsp;and&nbsp;delete&nbsp;any inactive themes. Even disabled themes can be exploited if they&nbsp;contain&nbsp;vulnerabilities.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-ddda0a69\"><h3 class=\"uagb-heading-text\">Clean WordPress Database&nbsp;<\/h3><\/div>\n\n\n\n<p>WordPress malware&nbsp;doesn\u2019t&nbsp;always live in files. Attackers often inject spam links, malicious scripts, or code directly into the database, which means your site can stay compromised even after&nbsp;you\u2019ve&nbsp;cleaned the filesystem.&nbsp;<\/p>\n\n\n\n<p>Start by opening your database in phpMyAdmin (or your&nbsp;host\u2019s&nbsp;database tool) and export a full&nbsp;backup&nbsp;before making any changes. Then check the most common persistence points:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Users: look for unfamiliar administrator accounts and remove anything you&nbsp;didn\u2019t&nbsp;create.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Options: verify that&nbsp;siteurl,&nbsp;home, and the admin email are correct, and watch for injected scripts or strange values.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Posts and comments: search for spam links, hidden&nbsp;&lt;script&gt;&nbsp;tags,&nbsp;iframes, and unexpected HTML that&nbsp;doesn\u2019t&nbsp;belong.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Remove suspicious entries carefully, then re-scan your site to confirm nothing is reappearing. If the database is heavily infected or&nbsp;you\u2019re&nbsp;unsure&nbsp;what\u2019s&nbsp;legitimate,&nbsp;restoring from&nbsp;a known-clean backup (made before the hack) is often the safest path.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-2d820f35\"><h2 class=\"uagb-heading-text\">WordPress Malware Removal Services&nbsp;<\/h2><\/div>\n\n\n\n<p>DIY cleanup can work if&nbsp;you\u2019re&nbsp;technically confident, but professional services can save time and reduce the risk of missed backdoors. Many providers also offer&nbsp;security&nbsp;hardening and monitoring options to help prevent reinfection.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-8ff2fb22\"><h3 class=\"uagb-heading-text\">When to Hire an Expert&nbsp;<\/h3><\/div>\n\n\n\n<p>Consider professional WordPress malware removal if:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You\u2019ve&nbsp;cleaned the site&nbsp;yourself&nbsp;but the infection keeps returning&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You&nbsp;don\u2019t&nbsp;have time to handle the technical work safely&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your host has suspended your account due to malicious activity&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your site is still flagged as unsafe after cleanup&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You\u2019re&nbsp;concerned about hidden backdoors or persistent access&nbsp;<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-43f51b56\"><h3 class=\"uagb-heading-text\">What Professional Services Include&nbsp;<\/h3><\/div>\n\n\n\n<p>Reputable malware removal services typically offer:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>File and database cleanup<\/strong>, including backdoors that automated scanners may miss. Many services combine automated scanning with manual review by security analysts.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Blacklist removal support<\/strong>, including guidance on review requests for Google and other security services.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Root cause investigation<\/strong>, to&nbsp;identify&nbsp;the&nbsp;most likely entry&nbsp;point&nbsp;such as a vulnerable plugin, compromised credentials, or misconfiguration.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security hardening recommendations<\/strong>, tailored to your site and hosting environment.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cleanup warranties<\/strong>, often 15\u201330 days depending on the provider and plan. Some services re-clean the site at no&nbsp;additional&nbsp;cost if&nbsp;it\u2019s&nbsp;reinfected within the warranty period.&nbsp;<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-55ccb62c\"><h3 class=\"uagb-heading-text\">Service Costs and Options&nbsp;<\/h3><\/div>\n\n\n\n<p>Most of the time, professional WordPress malware removal costs the same as a one-time cleanup or a monthly security plan. Depending on how bad the infection is and whether the service includes database cleanup, hardening, and blacklist support, one-time cleanups can cost anywhere from $59 to $400 or more per site.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Depending on the plan, monthly security subscriptions can start at $10 to $20 a month and include things like ongoing monitoring,&nbsp;firewall&nbsp;protection, and malware cleanup. A subscription model can be better than a one-time fix for sites that deal with transactions or sensitive data because it focuses on prevention and early detection, not just cleanup.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Check&nbsp;what&#8217;s&nbsp;included before you&nbsp;buy. Some services charge more for blacklist support, quick turnaround, or hardening. Read customer reviews carefully and look for complaints about hidden fees, upsells, or incomplete cleanups that keep coming up-&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-46678eac\"><h2 class=\"uagb-heading-text\">After Cleanup: WordPress Security Hardening&nbsp;<\/h2><\/div>\n\n\n\n<p>Cleaning malware solves the immediate problem.&nbsp;WordPress security hardening reduces the chance of reinfection and makes your site a harder target.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-950e6e92\"><h3 class=\"uagb-heading-text\">Strengthen Login Security&nbsp;<\/h3><\/div>\n\n\n\n<p>Change your &#8220;admin&#8221; username if you still use it. Make a new administrator account with a different username, log in with that account,&nbsp;delete&nbsp;the old one, and give its content to the new one.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Use a security plugin or a supported module to turn on two-factor authentication (2FA) for all admin accounts. Also, turn on login rate limiting to make brute force attacks take longer. Set reasonable limits that&nbsp;don&#8217;t&nbsp;keep real users out.&nbsp;&nbsp;<\/p>\n\n\n\n<p>If you&nbsp;don&#8217;t&nbsp;use XML-RPC (for example, you&nbsp;don&#8217;t&nbsp;use the WordPress mobile app or Jetpack features that need it), turn it off in your security plugin or on the web server level.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-87d70b34\"><h3 class=\"uagb-heading-text\">Lock Down File Permissions&nbsp;<\/h3><\/div>\n\n\n\n<p>Use restrictive file permissions to reduce what an attacker can&nbsp;modify. Typical safe defaults are:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Directories: 755&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Files: 644&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>wp-config.php: as strict as your hosting setup allows (often 600\u2013640)&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Never use 777 permissions. If your host provides a file manager, use it to apply permissions carefully and avoid breaking ownership\/permission settings.&nbsp;<\/p>\n\n\n\n<p>Disable the built-in WordPress file editor by adding this line to&nbsp;wp-config.php:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('DISALLOW_FILE_EDIT', true);&nbsp;<\/code><\/pre>\n\n\n\n<p>This removes the Theme and Plugin Editor from wp-admin, which helps limit damage if an admin account is compromised.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-d90b6d0b\"><h3 class=\"uagb-heading-text\">Regular Maintenance Schedule&nbsp;<\/h3><\/div>\n\n\n\n<p>WordPress security is ongoing. Create a maintenance routine:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Weekly:<\/strong>&nbsp;update plugins\/themes, review admin users, run a security scan&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Monthly:<\/strong>&nbsp;verify backups and test restores, review security logs, check Search Console warnings&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Quarterly:<\/strong>&nbsp;audit plugins and remove unused ones, review&nbsp;permissions&nbsp;and key settings&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>For higher-risk sites or production workloads, a VPS environment&nbsp;like Contabo\u2019s&nbsp;<a href=\"https:\/\/contabo.com\/en\/wordpress-vps\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress VPS<\/a>&nbsp;can provide stronger isolation than shared hosting and more control for server-level hardening such as SSH key authentication,&nbsp;firewall&nbsp;rules, and tools like fail2ban. Combined with WordPress security plugins, this gives you practical defense in depth.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-8217d694\"><h2 class=\"uagb-heading-text\">WordPress Hacked FAQ&nbsp;<\/h2><\/div>\n\n\n\n<p><strong>What&nbsp;to&nbsp;do&nbsp;if&nbsp;my&nbsp;WordPress&nbsp;site&nbsp;was&nbsp;hacked?<\/strong>&nbsp;<\/p>\n\n\n\n<p>Enable maintenance mode to reduce user exposure, then change all passwords (WordPress admin, hosting control panel, SFTP\/SSH, database, and any email accounts tied to resets). Run a malware scan, restore from a known-clean backup if you have one, or follow the cleanup steps in this guide: replace WordPress core files, remove compromised plugins\/themes, and clean the database.<\/p>\n\n\n\n<p><strong>How&nbsp;to&nbsp;tell&nbsp;if&nbsp;your&nbsp;WordPress&nbsp;site&nbsp;has&nbsp;been&nbsp;hacked?<\/strong>&nbsp;<\/p>\n\n\n\n<p>Common signs include browser or Google Safe Browsing warnings, unexpected redirects, new admin users you didn\u2019t create, suspicious .php files in wp-content\/uploads\/, or injected spam content. Use an external scanner for a quick check, then run a security plugin scan for deeper file and integrity analysis.<\/p>\n\n\n\n<p><strong>Why&nbsp;does&nbsp;my&nbsp;WordPress&nbsp;site&nbsp;keep&nbsp;getting&nbsp;hacked?<\/strong>&nbsp;<\/p>\n\n\n\n<p>Reinfection usually means the original entry point wasn\u2019t fixed. Common causes include hidden backdoors, outdated plugins\/themes, compromised credentials, or a compromised hosting account. Reinstall files from clean sources, remove unfamiliar code in wp-content, rotate all credentials, and enable 2FA on critical accounts.<\/p>\n\n\n\n<p><strong>What&nbsp;is&nbsp;the&nbsp;best&nbsp;WordPress&nbsp;security&nbsp;plugin?<\/strong>&nbsp;<\/p>\n\n\n\n<p>There isn\u2019t a single best option for every site. Wordfence is a strong all-in-one plugin with a good free tier, but it can be resource-intensive and the free version has delayed threat intelligence updates. Cloud-based options like Sucuri\u2019s WAF can block attacks before they hit WordPress and are often a better fit for high-value or high-traffic sites. Tools like MalCare are popular for automated scanning and cleanup workflows, especially for non-technical site owners. Choose based on your risk level, traffic volume, and whether you want a plugin-based or cloud-based approach.<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-1b7fc638\"><h2 class=\"uagb-heading-text\">Conclusion&nbsp;<\/h2><\/div>\n\n\n\n<p>A hacked WordPress site can seem overwhelming, but if you follow these steps, you can get it back to normal: find the infection, limit the damage, replace the files that were compromised, clean the database, and then make your setup more secure. The sooner you act, the less likely it is that abuse, data exposure, and SEO damage will continue.&nbsp;<\/p>\n\n\n\n<p>You can safely bring your site back online by following the steps in this guide: maintenance mode, resetting passwords, replacing core files, cleaning up the database, and making security stronger. Cleaning up is not the end of security. Keep WordPress, plugins, and themes up to date. Use strong passwords with two-factor authentication (2FA), run regular scans, and keep backups that have been tested.&nbsp;<\/p>\n\n\n\n<p>Finally, having the right hosting setup helps. An isolated environment with its own resources and stricter access controls makes common attacks less damaging and gives you more ways to harden your server. A&nbsp;<a href=\"https:\/\/contabo.com\/en\/wordpress-vps\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress VPS<\/a>&nbsp;gives&nbsp;you root access, resource isolation, and the ability to customize your server-level protections in ways that shared hosting&nbsp;can&#8217;t. When used with good WordPress hygiene, it makes a practical defense in depth and lowers the chance of getting hacked again.&nbsp;<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your WordPress site was hacked, act fast. Follow this step-by-step recovery plan to scan for malware, repair core files, remove hidden backdoors, and lock down your site for good.<\/p>\n","protected":false},"author":65,"featured_media":27042,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18],"tags":[],"ppma_author":[1489],"class_list":["post-26962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"uagb_featured_image_src":{"full":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp",1200,630,false],"thumbnail":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked-150x150.webp",150,150,true],"medium":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked-600x315.webp",600,315,true],"medium_large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked-768x403.webp",768,403,true],"large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp",1200,630,false],"1536x1536":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp",1200,630,false],"2048x2048":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2026\/01\/blog-head_wordpress-hacked.webp",1200,630,false]},"uagb_author_info":{"display_name":"Julia Mink","author_link":"https:\/\/contabo.com\/blog\/author\/julia-mink\/"},"uagb_comment_info":0,"uagb_excerpt":"If your WordPress site was hacked, act fast. Follow this step-by-step recovery plan to scan for malware, repair core files, remove hidden backdoors, and lock down your site for good.","authors":[{"term_id":1489,"user_id":65,"is_guest":0,"slug":"julia-mink","display_name":"Julia Mink","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/26ce5d4ae17d160425d842da4ea00c56716ffb5d4c58ee0cfb73de57b1de5272?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/comments?post=26962"}],"version-history":[{"count":25,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26962\/revisions"}],"predecessor-version":[{"id":27721,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26962\/revisions\/27721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media\/27042"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=26962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=26962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=26962"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=26962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}