SSL & Security8 April 2026Β· 10 min readΒ· Brian M., Systems Engineer16 views0 found this helpful

WordPress Security Hardening: A Step-by-Step Guide for 2026

Lock down logins, plugins, file permissions, XML-RPC, backups and updates. A practical WordPress hardening guide from engineers who clean up hacked sites.

A security analyst reviewing a WordPress dashboard and firewall logs on multiple monitors

WordPress powers a large share of the web, which makes it the most targeted platform too. The core software is maintained by a dedicated security team, but most hacks come from outdated plugins, weak passwords and poor hosting. These steps close the most common gaps.

1. Start with good hosting

Your host is your first line of defence. Look for account isolation (CloudLinux), a web application firewall, malware scanning and automatic backups. Our WordPress hosting includes these by default, along with LiteSpeed caching for speed.

2. Update core, themes and plugins

  • Enable automatic minor and security updates for WordPress core.
  • Update plugins weekly, ideally after testing on a staging copy.
  • Delete unused plugins and themes β€” deactivated code can still be exploited.
  • Never install "nulled" (pirated) premium plugins; they frequently contain backdoors.

3. Harden logins

  • Use unique administrator usernames (never "admin").
  • Enforce strong passwords and two-factor authentication for all editors and administrators.
  • Limit login attempts and consider restricting /wp-admin by IP for office-only teams.
  • Remove dormant accounts and review roles monthly.

4. Lock down the file system

  • Directories 755 and files 644; wp-config.php 600 or 640.
  • Disable the built-in file editor by adding define('DISALLOW_FILE_EDIT', true); to wp-config.php.
  • Block PHP execution inside /wp-content/uploads.
  • Rotate the security keys and salts in wp-config.php after any incident.

5. Reduce the attack surface

  • Disable XML-RPC if you do not use the mobile app or Jetpack.
  • Hide version numbers and directory listings.
  • Use a modern supported PHP version β€” older versions no longer receive security fixes.

6. Back up and test restores

Keep daily off-server backups with at least 14–30 days of history. Malware is often discovered weeks later, so you need a clean point to return to. Read our backup strategy guide.

7. Secure WooCommerce and payments

If you sell online, use HTTPS on every page, verify payment callbacks on the server and never trust amounts sent from the browser. See our secure checkout guide and the WooCommerce M-PESA plugin.

8. Monitor

Set up uptime monitoring, file-change alerts and log reviews. Register your site in Google Search Console so you are notified of security issues.

What to do if you are hacked

  1. Put the site into maintenance mode and change all passwords (hosting, database, WordPress, FTP, email).
  2. Restore a clean backup or have professionals remove the malware.
  3. Update everything and remove the vulnerable plugin.
  4. Request a review in Search Console if Google flagged the site.

The official WordPress hardening documentation covers more advanced options.

Want experts to handle it? Our website maintenance plans include updates, monitoring and clean-up. Also see the small business security checklist.

Share this article

Was this article helpful?

Your vote helps us write better guides.

Need a hand implementing this?

Enet engineers in Nairobi handle migrations, SSL installs, M-Pesa and eTIMS integrations for you.

Launch today

Powering Your Online Success!

Domain, hosting, email and SSL from one local team β€” set up in minutes and backed by people you can call.

  • Free SSL
  • Free migration
  • 99.9% uptime
  • 24/7 expert support

Start with your domain

Check availability, then add hosting in the same order.

Prefer to talk? Call +254 726 872 512