Secure Your WordPress Site Beyond Plugins: Manual Fixes for Common Vulnerabilities

··12 min read
Secure Your WordPress Site Beyond Plugins: Manual Fixes for Common Vulnerabilities

WordPress powers roughly four in ten websites on the internet, and that market share makes it the most attractive target for automated attacks. Most site owners know they need a security plugin. What fewer people realize is that installing one is the starting line, not the finish. Plugins catch a lot of noise, but they cannot fix a weak admin username, a writable theme directory, a forgotten test account that still has administrator rights, or a misconfigured file permission that quietly hands over the keys. The uncomfortable truth is that many compromised WordPress sites were running a security plugin at the time of the breach. The attacker did not defeat the plugin. They walked around it, usually through a vulnerable plugin they forgot to update, a stolen credential, or a backdoor planted months earlier in a file the scanner never looked at. Manual hardening closes those gaps, and it takes less time than most people expect. This article walks through the vulnerabilities we see most often when auditing WordPress sites and the manual fixes that address them. You will get exact commands and configuration snippets, a worked example showing how credential risk compounds, a comparison of common hardening approaches, and a step-by-step process you can follow without any other resource. I have applied these steps to my own client sites and a few of my own projects, and I will be honest about where each fix creates friction.

Key Takeaways
  • A security plugin is a detection layer, not a substitute for correct configuration. Treat it as one control among several.
  • Remove the default admin username and enforce unique, long passwords for every account with publishing or admin rights.
  • Lock down file permissions (directories at 755, files at 644, wp-config.php at 600 or 640) and disable PHP execution in upload directories.
  • Disable file editing from the dashboard and restrict XML-RPC unless you genuinely use it.
  • Audit every plugin and theme you have installed, not just the ones you use, and remove anything abandoned.
  • Test every change on a staging copy first, and keep an immutable or offline backup you can restore from.

Why Security Plugins Alone Leave Gaps

A security plugin does three things well: it blocks known attack signatures, it scans files for changes, and it throttles login attempts. Those are valuable. They do not, however, decide how your server is configured, which accounts exist, or whether a plugin you abandoned in 2021 still sits in your wp-content/plugins folder with a known remote code execution flaw.

Consider the typical attack chain. An attacker finds a plugin with an unpatched SQL injection vulnerability, uses it to create a new administrator account, then uploads a PHP file disguised as an image. The security plugin may flag the file later, but by then the attacker has a second entry point. Manual fixes break that chain at several links: the vulnerable plugin is removed, the upload directory will not execute PHP, and account creation requires a credential the attacker does not have.

The Layers You Actually Control

  • Identity: who can log in and how they prove it.
  • Surface: which plugins, themes, and endpoints are exposed.
  • Filesystem: what the web server can read, write, and execute.
  • Transport: how data moves between the visitor, the server, and the database.
  • Recovery: whether you can restore cleanly after something goes wrong.

A plugin mostly watches the surface. The rest of this article works through the other layers.

How Do I Fix Weak Login Credentials and Admin Accounts?

Credential attacks remain the single most common way WordPress sites get in. Bots try the username admin millions of times a day, pairing it with password lists pulled from previous breaches. Your job is to make that guessing game pointless.

Worked Example: Compounding Credential Risk

Say you run a small agency with 12 WordPress client sites. Each site has three staff accounts, so that is 36 administrator-level logins. Suppose the agency reuses one password across the team, and that password appeared in a 2023 breach dump. Attackers now need to test one credential against 36 login forms, and any single success gives them a foothold on a client site. If each of those 12 sites has a different admin username, you have 12 separate lockout-avoidance problems for the attacker. If all 12 use admin, you have made their job trivial.

The fix is not complicated. Unique passwords generated by a password manager, two-factor authentication on every privileged account, and no shared logins. Going from one shared password to unique 20-character passwords with 2FA changes the attacker's math from "one guess works everywhere" to "every site requires a separate, unguessable secret."

Steps to Harden Accounts

  1. Log in to your database through phpMyAdmin or WP-CLI and list users: wp user list --fields=ID,user_login,roles.
  2. If any account uses admin or administrator as its username, create a new administrator account with a unique name first.
  3. Log in as the new account and confirm it works. Then reassign any posts from the old account to the new one: wp post list --author=OLD_ID followed by an update, or use the Users screen to delete the old account and choose "attribute all content to" the new user.
  4. Delete the old admin account.
  5. Remove administrator rights from any account that only needs to publish content. Editors and Authors cannot install plugins or change settings, which limits the damage a compromised account can do.
  6. Enable two-factor authentication for every account with editing rights. Use an authenticator app rather than SMS where possible.
  7. Audit inactive accounts. Any user who has not logged in for 90 days should be suspended or removed.

If you are managing credentials across many clients, the same discipline applies to the password manager you use to store them. Our guide on what to do when your password vendor gets hacked covers the rotation steps if that ever happens to you.

What Are the Most Important WordPress File Permission Settings?

File permissions decide what the web server process can change on disk. When permissions are too loose, a single vulnerable plugin can write a backdoor into your theme and persist long after you update the plugin. When they are correctly tight, the same vulnerability often cannot write anything meaningful.

The commonly recommended baseline for a shared hosting or VPS setup is directories at 755, files at 644, and wp-config.php at 600 or 640. Some hosts use different owner and group configurations, so confirm with your provider before applying blanket changes.

Applying the Baseline

  1. SSH into your server and move to the WordPress root directory.
  2. Set directory permissions: find . -type d -exec chmod 755 {} \;
  3. Set file permissions: find . -type f -exec chmod 644 {} \;
  4. Lock down the config file: chmod 640 wp-config.php
  5. Verify ownership so the web server user owns only what it needs to write, typically the wp-content subdirectories used for uploads and caching.
  6. Reload the site and check that uploads, updates, and caching still function. If something breaks, identify which directory needs group write access rather than opening everything to 777.

Never set anything to 777. It is occasionally suggested as a quick fix for upload errors, and it is one of the most reliable ways to invite a compromise.

Block PHP Execution in the Uploads Folder

Attackers frequently upload a PHP file through a vulnerable form and then request it directly. Blocking PHP execution in wp-content/uploads stops that. On Apache, create a .htaccess file inside the uploads directory containing:

<Files *.php>
deny from all
</Files>

On Nginx, add a location block that returns a 403 for any .php request under /wp-content/uploads/. Test by placing a harmless PHP file in the folder and confirming the browser cannot execute it.

Which Hardening Approach Should You Choose?

Not every site needs every control. A brochure site for a local bakery and an e-commerce store processing card payments face different threat levels. The table below compares common approaches so you can decide where to spend effort.

Approach Setup Effort Protects Against Maintenance Burden Cost Main Tradeoff
Security plugin only Low (under 1 hour) Known signatures, brute force Low Free to moderate Misses config flaws and abandoned plugins
Manual config hardening Medium (2 to 4 hours) Credential abuse, file tampering, PHP upload attacks Low after setup Free (your time) Requires comfort with SSH and server files
Web application firewall (WAF) Medium Injection attacks, bot traffic at the edge Medium (rule tuning) Moderate to high Can block legitimate traffic if misconfigured
Immutable offsite backups Medium to high Ransomware, destructive compromise, bad updates Low to medium Moderate Restore testing takes real time
Full managed hosting with hardening Low (provider does it) Broad, depends on provider Low High Less control, vendor dependency

For most small sites, the best return comes from combining manual configuration hardening with a regular, tested backup. A WAF helps most when you run high-traffic or high-value sites. If you run a handful of plugins, a vulnerability scanner that checks against published CVE data is often enough to tell you when action is urgent.

How Do I Disable Risky WordPress Features?

WordPress ships with several features that are useful to developers and dangerous to everyone else. Two stand out.

Disable the Theme and Plugin File Editor

The built-in editor lets any administrator modify PHP files directly from the dashboard. If an attacker gains administrator access, this is the fastest way to plant a backdoor. Add the following line to wp-config.php above the "stop editing" comment:

define('DISALLOW_FILE_EDIT', true);

Also add define('DISALLOW_FILE_MODS', true); if you want to block plugin and theme installation from the dashboard entirely. This is

Cover image: Sad Cartoon versus Technology by Sean Loyless, licensed under BY 2.0 via Openverse.

Recent Posts

View all →

Most Popular Software

View all →

Browse by Platform

View all →