This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Remove a WordPress Backdoor: Manual Method vs. Malware Protection Add-on

Updated on March 26, 2026

11 Min Read
WordPress Backdoor

Key Takeaways

  • Manual backdoor hunting requires digging through obfuscated files and database tables, a risky process where a single oversight leaves your site infected.
  • Standard security plugins often fail to detect server-level backdoors, frequently hit memory limits during deep file scans, and easily miss custom scripts.
  • The Cloudways Malware Protection Add-on automates backdoor removal at the server level, neutralizing hidden threats without site risks for just $4/month per application.

When your website gets infected, removing the malware is rarely a one-time task. Site owners often delete malicious files only to find the infection returns shortly after. This recurring issue is the direct result of a hidden WordPress backdoor.

Hackers install these scripts to maintain continuous server access, making your basic cleanup efforts completely ineffective.

Hunting down a hidden backdoor is one of the most frustrating aspects of website security because the malicious code is specifically designed to remain undetected. To stop the cycle of reinfection, you must locate and remove this hidden entry point.

In this guide, we will look at how these backdoors operate, the manual process for finding and deleting them, and how to automate the entire job using the Cloudways Malware Protection add-on.

What is a WordPress Backdoor?

A WordPress backdoor is exactly what it sounds like. It is a hidden entry point that lets unauthorized users sneak into your website.

Instead of trying to guess your username and password, hackers upload a piece of malicious code or a script to your file system. This code allows them to bypass the normal admin login screen and access your server directly at any time.

The primary goal here is persistence. Attackers know you will eventually spot their spam pages or malicious redirects and delete them. They leave backdoors behind to act as a secret key.

Even after you clean up all the visible damage, this hidden file gives them the power to instantly reinfect your site without starting their attack from scratch.

Remove WordPress Backdoors Automatically

Manual cleanup and plugins miss deep-rooted scripts. Cloudways Malware Protection add-on scans your server to find and extract these hidden threats automatically.

How Do Hackers Install Backdoors?

Hackers need a way into your server before they can drop their hidden scripts. They rely on specific vulnerabilities to bypass your initial defenses. Here is how they typically gain that first foothold.

Nulled Themes and Plugins

Downloading premium plugins for free comes with a heavy cost. These pirated files almost always contain pre-installed backdoors. When you upload a nulled theme to your site, you actively hand a hacker direct access to your server environment.

Outdated Software

Running old versions of WordPress core or unpatched plugins leaves your site heavily exposed. Hackers deploy automated bots that scan the internet looking for these exact vulnerabilities. When a bot finds an outdated plugin on your site, it exploits the known flaw to upload a backdoor script automatically.

Weak Passwords

Attackers often just walk right through the front door. Using brute-force attacks, hackers guess simple passwords to log into your WordPress dashboard. Once they gain administrator privileges, they can upload a backdoor directly into your files using the built-in theme editor.

Common Signs Your WordPress Site Has a Backdoor

Hackers design backdoors to be invisible, but the actions they take leave a trail. You can usually tell someone has hidden access to your server by looking for a few specific symptoms.

The Re-infection Loop

This is the most obvious red flag. You spend hours cleaning infected files and restoring backups. Your site looks fine, but the spam redirects or malicious code return within 24 to 48 hours. The malware keeps coming back because the attacker is using a hidden file to reinstall it over and over.

Unrecognized Admin Accounts

Hackers often create new user profiles with Administrator privileges to maintain control. If you check your WordPress dashboard and see new admin accounts you did not authorize, someone else is inside your system.

Spikes in Server CPU

Backdoors run background tasks that drain your server resources. If an attacker is using your site to send thousands of spam emails or mine cryptocurrency, your hosting dashboard will show a massive, unexplained spike in CPU usage.

If you notice sudden spikes in CPU usage or unrecognized admin users, you need to scan your website for malware to find the hidden entry point.

How to Find and Remove a WordPress Backdoor Manually

Locating and removing a backdoor manually is a delicate process. One wrong move inside your server files can take your entire website offline. You need to proceed with extreme caution and follow a strict order of operations.

Step 1: Secure a Full Backup

Before modifying a single line of code, you must save a copy of your current site state. If you accidentally delete a critical system file during your search, you will need this backup to restore functionality.

  • Save your files: Download an FTP client such as FileZilla. Connect to your server using your credentials, locate the public_html directory, and download the entire folder to your local computer.

Download site files using FileZilla FTP

  • Save your database: Access phpMyAdmin through your hosting dashboard. Choose your site’s database and export a .sql copy to your local drive.

Select database in phpMyAdmin

Export database from phpMyAdmin

Confirm database export format

  • For Cloudways users: If your site is hosted on Cloudways, you can skip the manual downloads. Go to Application Management, select your application, navigate to Backup And Restore, and click the button to generate an immediate backup.

Generate 1-click backup in Cloudways Application Management

Step 2: Inspect the Uploads Directory

The wp-content/uploads folder is built exclusively for images, videos, and documents. It should never contain executable scripts. Attackers frequently place their hidden access files here because site owners rarely check this location for code.

  • Open your FTP client and navigate to the uploads directory.
  • Look carefully through the subfolders organized by year and month. If you see a .php file sitting next to your image files, treat it as hostile.

Suspicious PHP file located inside the wp-content/uploads directory

  • Open the file to inspect the contents. Malicious scripts usually look like a wall of scrambled characters. If the code is unreadable, delete the file right away.

Obfuscated PHP code inside a hidden backdoor script

Step 3: Search for Disguised PHP Functions

Hackers often inject their access codes directly into legitimate WordPress files. They specifically target wp-config.php and the functions.php file of your active theme.

  • Go to the official WordPress repository and download a fresh copy of the core files.
  • Use a text editor to compare your live wp-config.php file with the clean downloaded version. Look for unfamiliar blocks of code, especially at the very beginning or the very end of the document.
  • Watch out for specific PHP commands that hackers use to hide their activity. Functions like eval(), base64_decode(), and preg_replace() are strong indicators of a compromise when found outside their normal context.

Malicious PHP functions injected into a core configuration file

  • If you see these functions attached to a long string of random text, carefully remove that specific block, save the file, and reupload it.

Step 4: Identify Fake System Files

Malicious scripts often rely on file masquerading. Attackers drop backdoors directly into your primary directories using naming conventions that mimic authentic core files. This tactic allows the malware to pass standard visual inspections.

  • Check your root directory and the wp-includes folder via FTP.
  • Look for files with slightly modified names, such as wp-options.php, wp-user.php, or index-config.php.

Fake system files disguising backdoors in root directory

  • Since WordPress does not actually use these files, their presence means your site is compromised. Delete them completely.

Step 5: Clear Out Hidden Database Admins

Fake admin accounts are often buried directly inside your database. This allows an attacker to log right back into your site, even if you successfully find and delete every malicious PHP file.

  • Access phpMyAdmin through your hosting control panel and click on your WordPress database.
  • Open the wp_users table. Look for any email addresses or usernames you do not recognize. Delete those rogue rows immediately.

Rogue admin account found in the wp_users database table

  • Also open the wp_options table and search the option_name column for active_plugins. Malicious plugins are sometimes injected straight into the database so they remain completely invisible on your actual WordPress dashboard. Edit that specific row and delete the unfamiliar plugin text.

The Danger of Manual Backdoor Hunting

We just looked at multiple steps to find and delete these hidden scripts, but those are only the most common hiding spots. A complete manual removal often requires digging into even more directories and database tables.

While technically possible, executing this entire process by hand is highly prone to failure. Relying on human eyes to scan thousands of server files carries significant risks for two main reasons.

The Obfuscation Problem

Hackers do not write malicious code in plain text. They use complex obfuscation techniques to scramble their scripts into thousands of lines of unreadable code. They hide these payloads inside legitimate files or create fake files with names like wp-options.php to bypass visual inspections.

A manual search will almost always miss a fragmented script hidden deep within a core directory. If you overlook even a single line of malicious code, the backdoor remains active and the reinfection loop continues.

The Risk of Site Breakage

Editing core WordPress files directly is extremely dangerous. When you attempt to delete an injected function from your wp-config.php file, you are modifying the structural foundation of your website.

Deleting the wrong line of code, or accidentally removing a single bracket, will instantly crash your site. This simple human error usually results in a critical database connection error or a complete white screen of death.

How to Scan for WordPress Backdoors Using a Security Plugin

Since manual removal is risky and time-consuming, most site owners naturally turn to WordPress anti-malware plugins. Tools like Wordfence or Sucuri automate the scanning process and look for known malware signatures across your files.

Here is how to run a standard malware scan using Wordfence, one of the most common security plugins:

Step 1: Install and Activate the Plugin

  • Log into your WordPress admin dashboard.
  • Navigate to Plugins, then click Add New.
  • Search for Wordfence Security, or any other reliable Wordfence alternative). Click Install Now, and then activate the plugin.

Install Wordfence Security plugin in WordPress

Step 2: Configure the Scan Options

  • In your left-hand menu, locate the new Wordfence tab and select Scan.
  • Click on Scan Options and Scheduling.
  • In the options, select the High Sensitivity scan profile. This forces the plugin to look deeper for obfuscated code, though it may return false positives. Save your changes.

Configure Wordfence scan to High Sensitivity

Step 3: Run the Scan and Review Results

  • Return to the main Wordfence Scan page and click Start New Scan.

Click Start New Scan in Wordfence

  • Wait for the plugin to process your files, themes, and database.
  • Once finished, review the list of flagged items. The plugin will provide options to repair the file (reverting it to the official WordPress repository version) or delete the file entirely.

Review flagged items in Wordfence scan results

Repair or delete infected files identified by Wordfence

Why Standard Plugins Still Miss Hidden Backdoors

Running a plugin scan is a good preliminary step, but it is not a foolproof solution. Hackers who build backdoors are fully aware of how tools like Wordfence operate, and they specifically design their scripts to evade them.

Relying entirely on a standard WordPress security plugin leaves your site vulnerable for several key reasons:

  • Limited Scanning Scope: Plugins operate entirely inside the WordPress environment. If a hacker places a backdoor at the server level—such as modifying your core server configuration or hiding scripts outside your public_html folder—a standard plugin cannot see it.
  • Hidden Database Entries: While top-tier plugins scan your database, complex backdoors are often encrypted or injected into unusual tables. A standard plugin scan can easily skip over these modified entries.
  • Incomplete Scans Due to Memory Limits: Deep scanning requires massive server resources. Plugins frequently hit PHP memory limits and time out before finishing. Attackers exploit this by burying backdoors deep in large directories, knowing the plugin will likely crash before reaching the payload.
  • Inability to Detect Custom Code: Plugins compare your files against a database of known malware. If a hacker writes a brand-new, custom script, the plugin will not recognize it. It simply skips over the unknown code because it does not match an existing threat profile.

How Cloudways Malware Protection Add-on Blocks WordPress Backdoors at the Server Level

Both manual code editing and standard plugin methods have severe limitations. Editing files by hand puts your entire site at risk of crashing, and basic security plugins are easily bypassed by hackers who hide their backdoors outside the WordPress directory.

To provide a definitive solution, Cloudways integrates the Malware Protection add-on directly into the hosting platform. Powered by Imunify360, this tool operates entirely at the server level, bypassing the application-level blind spots that cause standard plugins to fail.

Here is how the add-on targets and neutralizes complex backdoors without requiring you to touch a single line of code:

  • Automated Backdoor Cleanup: Instead of forcing you to hunt for obfuscated base64_decode functions, the server-level scanner locates hidden scripts automatically. It extracts the malicious payload while leaving your legitimate WordPress core files perfectly intact.
  • Deep Database Auditing: Our scanner bypasses standard WordPress queries to dig directly into your database. It uncovers hidden rogue administrator accounts in your wp_users table and invisible plugins injected into the wp_options table. It also clears out malicious server cron jobs that hackers use to rebuild their backdoors.
  • Runtime Application Self-Protection (RASP): This feature actively monitors your environment. If a hidden backdoor attempts to execute a command, RASP identifies the unauthorized action and blocks it in real-time.
  • Proactive Zero-Day Defense: Hackers constantly write new backdoor scripts to evade standard signature-based plugins. This add-on uses a PHP evaluation engine to analyze exactly what a script is trying to do. If it behaves like a backdoor, it is stopped immediately, even if it is a brand-new, unrecognized threat.

How to Enable Cloudways Malware Protection Add-on

Activating the protection takes just a few clicks. The heavy lifting happens at the server level, meaning the deep scans run in the background without draining your WordPress memory or crashing your site.

Step 1: Navigate to Application Security

Log into your Cloudways account, select your target server, and click into your specific application. On the left-hand management menu, click on Application Security and select the Malware Protection tab.

Step 2: Activate the Scanner

Click the Enable Protection button. This action instantly activates the real-time monitoring features and triggers a comprehensive scan across your entire web directory and database.

wordpress-backdoor-image12

Step 3: Monitor Your Dashboard

Once the add-on finishes its initial sweep, you can manage backdoor threats and review automated cleanup actions across three tabs:

  • Malicious: This tab lists any isolated backdoor files or compromised database tables. It shows you the exact path of the hidden script and confirms whether it was Cleaned, Quarantined, or Removed.
  • Scan History: Here, you can review the logs of all background security sweeps or click “Start Scan” to force an immediate, on-demand check of your server.
  • Proactive Defense: This runtime protection log shows you exactly when and where malicious PHP scripts were actively blocked from executing their payloads.

Malicious tab showing quarantined threats in Malware Protection

Scan History tab tracking automated security scans

Proactive Defense tab logging blocked malicious scripts

Wrapping Up!

WordPress backdoors are built to be invisible, persistent, and hard to remove. As long as one line of malicious code stays hidden on your server, attackers keep full control of your site.

Manual removal and standard security plugins offer a starting point, but both have risks and blind spots. Visual inspection or application-level scanners often miss deep database injections and obfuscated server files.

Permanently securing your site means stopping threats at the server level. The Cloudways Malware Protection Add-on ($4/month per application) automates the entire process. It detects hidden payloads, removes them safely, and blocks future attacks without risking your core WordPress files.

Q. How do I know if my WordPress site has a backdoor?

A. You might notice unauthorized admin accounts in your database, unexplained website redirects, or sudden spikes in server resource usage. Hackers also frequently modify core files like wp-config.php to hide their malicious scripts.

Q. Can a standard security plugin remove all WordPress backdoors?

A. No, basic plugins operate strictly at the application level and often miss deeply obfuscated code or server-level cron jobs. They also consume massive amounts of memory and frequently crash before completing a deep file scan.

Q. Why do backdoors keep coming back after I delete them?

A. The reinfection loop happens because manual removal almost always misses a fragmented script or a hidden database privilege. To stop them permanently, you must use a server-level scanner that proactively blocks unauthorized script executions.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Abdul Rehman

Abdul is a tech-savvy, coffee-fueled, and creatively driven marketer who loves keeping up with the latest software updates and tech gadgets. He's also a skilled technical writer who can explain complex concepts simply for a broad audience. Abdul enjoys sharing his knowledge of the Cloud industry through user manuals, documentation, and blog posts.

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour