Home Blog How to Secure a WordPress Website: An Ironclad 16-Point Security Checklist

How to Secure a WordPress Website: An Ironclad 16-Point Security Checklist

ET
Editorial Team
The NodeGuard Editorial Team
November 2, 2026 15 min read WordPress
How to secure a WordPress website – shield with a 16-point security checklist

Learning how to secure a WordPress website is less about finding one magic plugin and more about closing the doors attackers actually use. Bots don’t care how small your site is. They scan the whole internet for weak passwords, outdated plugins and forgotten admin accounts, and they find them fast.

The good news is that most WordPress hacks are preventable. A short list of habits and settings blocks the vast majority of automated attacks, and you don’t need to be a security engineer to apply them.

This guide gives you a practical 16-point security checklist, grouped into five areas: logins, updates, hardening, the server, and backups. Work through it once, then keep it as your routine. Where a step needs a command, it’s included, with Nginx examples for sites running on their own VPS.

Why WordPress Security Matters in 2026

WordPress core itself is in good shape. The risk sits around it. Patchstack’s State of WordPress Security in 2026 report logged 11,334 new vulnerabilities across the WordPress ecosystem in 2025, a 42% jump on the year before. Of those, 91% were in plugins and 9% in themes, while WordPress core had only six, all rated low risk.

Two more findings from the same report shape how you should approach WordPress security. First, 46% of vulnerabilities had no fix from the developer when they were disclosed, so “just update” isn’t always enough. Second, attackers now start exploiting popular flaws within hours of disclosure, which leaves very little time for manual patching.

What does that mean in practice? Your WordPress security depends mostly on three things you control:

  • How many plugins and themes you run, and how well they’re maintained
  • How hard your logins are to guess or steal
  • How quickly you can recover if something does go wrong

A hacked site costs more than cleanup time. Google can show a warning in front of it, your host may suspend it, your visitors’ data may be exposed, and spam injected into your pages can drag down your rankings for months. Prevention is far cheaper than recovery.

How to Secure a WordPress Website: The 16-Point Security Checklist

Here’s the full security checklist at a glance. Each point is explained below, with the exact settings or commands you need.

Logins and users

  1. Use strong, unique passwords
  2. Turn on two-factor authentication
  3. Limit login attempts
  4. Remove the “admin” username and trim user roles
  5. Disable XML-RPC and Application Passwords if you don’t use them

Updates and plugins

  1. Keep core, plugins and themes updated
  2. Remove unused plugins and themes, and vet new ones
  3. Install one security plugin with a firewall

WordPress hardening

  1. Disable the built-in file editor
  2. Lock down wp-config.php and file permissions
  3. Block PHP execution in the uploads folder
  4. Add security headers

Server and connection

  1. Force HTTPS everywhere
  2. Run a supported PHP version
  3. Firewall the server and use SSH keys

Backups and monitoring

  1. Keep automatic off-site backups and watch your logs

You don’t have to do all 16 today. Points 1, 2, 6, 7 and 16 stop the most common attacks and take less than an hour together. Start there, then work through the rest over the next week.

How to secure a WordPress website – 16-point security checklist grouped into five areas
The 16-point WordPress security checklist, grouped into logins, updates, hardening, server and backups.

Lock Down Logins with Two-Factor Authentication (Points 1–5)

The login page is the most attacked part of any WordPress site. Bots hit wp-login.php around the clock with huge lists of leaked passwords, a technique called credential stuffing. These five points make that approach useless.

1. Use Strong, Unique Passwords

Every account with access to your site needs a long, random password that isn’t used anywhere else. That includes WordPress users, your hosting control panel, the database user, SFTP or SSH accounts, and the email address attached to your admin account.

WordPress already generates a strong password when you create a user or reset one, so accept that suggestion instead of typing your own. Store it in a password manager. Reused passwords are the main reason credential stuffing works: when another service leaks your password, bots try it on your site next.

2. Turn On Two-Factor Authentication

Two-factor authentication (2FA) asks for a second proof of identity after the password, usually a six-digit code from an authenticator app on your phone. Even if someone steals a password, they can’t log in without that code.

Turn on two-factor authentication for every administrator and editor at the very least. The free Two Factor plugin, maintained by WordPress contributors, handles this well, and most security plugins include it too. Save the backup codes somewhere safe outside the site, so you can’t lock yourself out.

If you only do one thing from this security checklist, make it two-factor authentication. It stops the most common account takeover attacks almost completely.

3. Limit Login Attempts

By default, WordPress lets anyone try as many passwords as they like. Limiting login attempts blocks an IP address after a few failures, which turns a brute-force attack from millions of guesses into a handful.

Most security plugins include this feature. On your own server, you can also rate-limit the login page in Nginx, so bad requests are refused before PHP even runs:

# In the http block (for example /etc/nginx/nginx.conf)
limit_req_zone $binary_remote_addr zone=wplogin:10m rate=5r/m;

# In your site's server block
location = /wp-login.php {
    limit_req zone=wplogin burst=3 nodelay;
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}

Change the PHP socket path to match your PHP version, then test with sudo nginx -t and reload.

Some site owners also move the login page to a custom address. That cuts the noise in your logs, but it isn’t real protection on its own, so treat it as a bonus rather than a replacement for 2FA and rate limiting.

4. Remove the “admin” Username and Trim User Roles

“admin” is the first username every bot tries. If you still have an account with that name, create a new administrator with a different username, log in as the new user, then delete the old account and assign its content to the new one.

Then review Users → All Users. Give each person the lowest role that lets them do their job: authors and editors don’t need administrator rights. Delete accounts for people who no longer work on the site. Every extra admin account is one more password that could leak.

5. Disable XML-RPC and Application Passwords If You Don’t Use Them

XML-RPC is an older remote access interface. Some tools, such as Jetpack and older mobile apps, still use it, but attackers like it because it can test many passwords in a single request. If nothing on your site needs it, block it in Nginx:

location = /xmlrpc.php {
    deny all;
}

Application Passwords let external apps connect to your site through the REST API. They’re useful for integrations, but if you don’t use any, switch them off with your security plugin or with this one-line snippet in a small custom plugin:

add_filter( 'wp_is_application_passwords_available', '__return_false' );

Updates, Plugins and Choosing a Security Plugin (Points 6–8)

With 91% of new vulnerabilities found in plugins, this is the section where WordPress security is won or lost.

6. Keep Core, Plugins and Themes Updated

Most hacked WordPress sites run a plugin version with a known, already-fixed flaw. Updating closes that door, and the sooner the better, because exploitation now begins within hours of a flaw going public.

Minor WordPress core releases, which carry security fixes, install automatically by default. For plugins and themes, go to Plugins → Installed Plugins and click “Enable auto-updates” for anything well maintained. On larger or business-critical sites, you may prefer to update by hand a couple of times a week after reading the changelog, but never let updates sit for weeks.

If you manage the server yourself, WP-CLI makes this quick:

wp core update
wp plugin update --all
wp theme update --all

Take a backup first (point 16), so a bad update becomes a five-minute rollback rather than an emergency.

7. Remove Unused Plugins and Themes, and Vet New Ones

Deactivated plugins can still be attacked. Their files stay on the server, and vulnerable code can often be reached directly. If you don’t use a plugin or theme, delete it. Keep one default theme as a fallback and remove the rest.

Before you install anything new, check four things on its WordPress.org page or the vendor’s site:

  • When it was last updated (be wary of anything untouched for over a year)
  • Whether it’s tested with your WordPress version
  • How many active installations it has, and how well support questions get answered
  • Whether it has open vulnerabilities, using a database such as Patchstack or WPScan

Fewer, better plugins also make your site faster, which is the other half of the story in our guide on how to speed up a WordPress website.

Remember that almost half of disclosed flaws had no patch at the time of disclosure. If a plugin you rely on has an unpatched vulnerability, replace it or deactivate and delete it until a fix ships.

8. Install One Security Plugin with a Firewall

A good security plugin bundles several points from this list into one place: login limits, two-factor authentication, file change detection, and a web application firewall (WAF) that filters malicious requests before they reach your other plugins. Popular options include Wordfence, Solid Security and Sucuri Security, and each has a free version.

Pick one security plugin and configure it properly. Running two at the same time usually causes conflicts and slows the site down without adding real protection.

You can also put a cloud-based firewall such as Cloudflare in front of the site. It filters bad traffic before it ever reaches your server, which helps with both security and server load.

Harden Your WordPress Security at the File Level (Points 9–12)

Hardening means changing default settings that make life easier for attackers. These four points take a few minutes on a VPS. The official WordPress hardening guide covers each one in more depth if you want the background.

9. Disable the Built-In File Editor

WordPress includes a code editor for themes and plugins in the dashboard. If an attacker gets into an admin account, that editor lets them plant malicious code in seconds. Turn it off by adding this line to wp-config.php, above the line that says “That’s all, stop editing!”:

define( 'DISALLOW_FILE_EDIT', true );

While you’re there, make sure debug output is hidden on your live site, because error messages can reveal file paths and plugin details:

define( 'WP_DEBUG_DISPLAY', false );

10. Lock Down wp-config.php and File Permissions

wp-config.php holds your database password and secret keys, so it should be readable only by the account that runs your site. The usual safe permissions are 755 for folders and 644 for files, with wp-config.php kept tighter:

cd /var/www/example.com
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
sudo chmod 640 wp-config.php

640 works when the web server’s group owns the file; adjust it if your setup differs. Never set anything to 777, even “just to make an upload work”. Fix the ownership instead.

Two more quick checks. First, look at the security keys and salts in wp-config.php. If they look like placeholders, replace them with fresh values from the official WordPress salt generator; this also logs every user out, which is useful after a suspected breach. Second, delete stray copies such as wp-config.php.bak, old .zip archives or database exports from the web root. Bots look for them by name.

11. Block PHP Execution in the Uploads Folder

The wp-content/uploads folder should only ever contain images, PDFs and other media. A common attack uploads a PHP file disguised as an image, then runs it. Tell Nginx never to execute PHP there:

location ~* /(?:uploads|files)/.*\.php$ {
    deny all;
}

On Apache, create an .htaccess file inside wp-content/uploads with this content:

<Files *.php>
    Require all denied
</Files>

12. Add Security Headers

Security headers tell the browser how to treat your pages, and they block whole classes of attack, such as clickjacking and content-type sniffing. Add these to your Nginx server block, then reload Nginx:

add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;

One Nginx gotcha: if a location block has its own add_header lines, it ignores the ones from the server block, so repeat the headers there. Once HTTPS works everywhere (point 13), add a Strict-Transport-Security header too, so browsers never fall back to plain HTTP.

Secure the Server and the Connection (Points 13–15)

WordPress security doesn’t stop at WordPress. If the server underneath is weak, an attacker can go around every setting above.

WordPress security layers from the server and connection up to logins, with backups underneath
Good WordPress security works in layers, so one failure doesn’t expose the whole site.

13. Force HTTPS Everywhere

HTTPS encrypts everything between your visitor and the server, including login passwords and session cookies. A free certificate from Let’s Encrypt is enough for almost every site, and Certbot can install and renew it automatically. Once the certificate is in place:

  • Set both WordPress Address and Site Address to https:// under Settings → General
  • Redirect all HTTP traffic to HTTPS at the server level
  • Fix any mixed content warnings, where images or scripts still load over plain HTTP

14. Run a Supported PHP Version

Every PHP release gets security fixes for a limited time only. Running an old one means known flaws in PHP itself never get patched. Check the official list of supported PHP versions and stay on a release that still gets security updates. In late 2026 that means PHP 8.3 or newer, because security support for PHP 8.2 ends on 31 December 2026.

Test the site after switching. If an old plugin breaks on a current PHP version, treat that as a warning sign about the plugin, not a reason to stay on old PHP.

15. Firewall the Server and Use SSH Keys

On a VPS, you’re also responsible for the server’s own front door. Three steps matter most:

  • Firewall: allow only the ports you need, usually SSH, HTTP and HTTPS, and deny everything else. Our step-by-step guide shows how to configure UFW firewall on Ubuntu in a few minutes.
  • SSH access: log in with keys instead of passwords, then turn off password logins and direct root login. Follow our guide to set up SSH keys on Ubuntu if you haven’t done it yet.
  • Database: keep MariaDB or MySQL listening on localhost only, and give WordPress its own database user with rights to its own database and nothing else.

Turn on automatic security updates for the operating system as well, so fixes for the kernel, OpenSSL and other packages arrive without you having to remember.

Backups and Monitoring: Your Last Line of Defense (Point 16)

16. Keep Automatic Off-Site Backups and Watch Your Logs

No security checklist is perfect. When something does get through, a clean backup decides whether you lose an afternoon or the whole site.

A good backup setup has three properties:

  • Automatic: at least daily, and more often for busy online shops
  • Complete: the database and the whole wp-content folder
  • Off-site: stored away from the server, so a hacked or failed server doesn’t take the backups with it

Keep several days or weeks of backups, not just the latest one. Some infections go unnoticed for a while, and you need a copy from before it started. Test a restore at least once, too. A backup you’ve never restored is only a hope.

Then add monitoring, so you hear about problems early:

  • An activity log plugin that records logins, user changes and plugin installs
  • File change detection from your security plugin
  • Uptime monitoring that alerts you when the site goes down
  • Google Search Console, which emails you if Google finds malware or hacked content on your site

Common WordPress Security Mistakes to Avoid

Even careful site owners fall into these traps:

  • Trusting a security plugin alone while ignoring updates. A firewall can’t fully protect a plugin that’s six months out of date.
  • Keeping deactivated plugins “just in case”. Their files are still on the server.
  • Installing “nulled” premium plugins. Pirated copies very often come with hidden malware.
  • Sharing one admin login between several people. Give everyone their own account, so you can remove access cleanly.
  • Storing backups only on the same server. One incident can wipe out the site and its backups together.
  • Leaving old files in the web root, such as installer scripts, test pages or database dumps.

Let Your Hosting Take Care of Part of the Checklist

Several points on this list depend on your hosting. If you’d rather not manage them yourself, NodeGuard WordPress hosting is managed and ready to go, with automatic updates, backups and free SSL built in, plus NVMe storage and caching for speed. That leaves you free to focus on the points only you can control, such as strong passwords, two-factor authentication and which plugins you install.

If you’d rather control every layer yourself, including the firewall, PHP version and SSH settings, a NodeGuard Cloud VPS gives you root access and dedicated resources to apply this whole checklist your way.

Frequently Asked Questions

Is WordPress secure enough for a business website?

Yes. WordPress core is well maintained and had only six low-risk vulnerabilities reported in 2025. Most real-world hacks come from outdated plugins, weak or reused passwords and poorly configured servers, which are exactly the areas this checklist covers.

Do I need a security plugin if my host already has a firewall?

Usually, yes. A server firewall protects ports and network traffic, while a security plugin understands WordPress itself: login attempts, user accounts, file changes and plugin-specific attacks. The two work at different layers and complement each other.

How often should I review my WordPress security?

Let updates run automatically or apply them at least weekly. Review users and installed plugins once a month, and run through the full security checklist every quarter, as well as after any big change such as a redesign or a move to a new server.

What should I do if my WordPress site gets hacked?

Put the site into maintenance mode, then change every password: WordPress users, hosting, database, SFTP and SSH. Restore a clean backup from before the infection, update everything, replace the security keys and salts, and find out how the attacker got in so it can’t happen again. If Google flagged the site, request a review in Search Console once it’s clean.

Does changing the database table prefix improve security?

Only a little. A custom prefix can stop some automated SQL injection scripts that assume the default wp_ prefix, but it does nothing against the attacks that cause most hacks. On an existing site, your time is better spent on updates, two-factor authentication and backups.

Conclusion

Now you know how to secure a WordPress website without guesswork. Lock down logins with strong passwords, two-factor authentication and login limits. Keep core, plugins and themes updated, delete what you don’t use, and let one security plugin with a firewall watch the front door. Harden the files, secure the server and the connection, and keep automatic off-site backups so you can always recover.

Start with the five quick wins today, then work through the rest of the checklist over the coming week. WordPress security isn’t a one-time job, but once these habits are in place, it takes only minutes a month to maintain.

If you want a head start, NodeGuard WordPress hosting handles updates, backups and SSL for you. And if you’d rather build and secure everything yourself, a NodeGuard Cloud VPS gives you full control of every layer.


ET

Editorial Team

The NodeGuard Editorial Team creates practical, informative, and easy-to-follow guides on VPS hosting, Linux, server administration, cybersecurity, web hosting, and cloud infrastructure. Our goal is to help developers, businesses, and technology enthusiasts make informed decisions, improve their technical knowledge, and manage their online infrastructure with confidence. Through tutorials, explainers, and in-depth guides, we make complex technical topics accessible to everyone.

Leave a comment

Related articles