Categories
Security WordPress

WordPress Security Best Practices: My 2012 List, Updated for 2026

Last updated: October 17, 2026

Disclosure: some links in this post are affiliate links, marked as sponsored. If you buy through them I may earn a commission at no extra cost to you. I only recommend hosts I have used on real client sites.

I wrote the first version of this post in 2012 as a follow-up to my almost perfect .htaccess file article. Some of that advice aged well. Some of it (Flash galleries, anyone?) did not. This is the updated list, based on what I actually do on client sites today.

The short version: most hacked WordPress sites I clean up were not hit by anything clever. They had an outdated plugin, a reused password, or no backups. Fix those three and you are ahead of most of the web.

The 2026 checklist

  1. Keep WordPress, plugins, and themes updated. Minor core releases update automatically. Turn on auto-updates for plugins you trust from the Plugins screen.
  2. Delete what you don’t use. Inactive plugins and themes can still be exploited. If it is not active, remove it.
  3. Use strong, unique passwords and a password manager. Every account, not just yours.
  4. Turn on two-factor authentication for every administrator. A plugin like Two Factor or the 2FA in your security plugin handles this.
  5. Give people the lowest role they need. Your content writer does not need to be an Administrator.
  6. Keep backups off the server. A backup stored on the same server as the site is not much of a backup. Test a restore at least once.
  7. Use HTTPS everywhere. Certificates are free now. There is no reason to send a login over plain HTTP.
  8. Use SFTP or SSH, never plain FTP. Plain FTP sends your password in clear text.
  9. Turn off the built-in file editor so a stolen admin login can’t be used to edit PHP from the dashboard.
  10. Put a firewall in front of the site. Cloudflare, a security plugin, or your host’s own edge protection all count.

My original 2012 tips, revisited

2012 tip2026 verdict
Change the wp_ table prefixLow value. Fine on a new install, not worth the risk of changing on a live site.
Remove the “admin” usernameStill good. The installer has asked you to pick a username for years now.
Restrict wp-admin by IP in .htaccessWorks on Apache, but most people’s IPs change too often. 2FA is the better fix.
Remove unused themes and pluginsStill one of the best things you can do.
Password protect /wp-admin/Optional extra layer. It can break admin-ajax requests, so test it.
Lock down file permissionsStill valid. 644 for files and 755 for folders is the usual baseline.
Hide the WordPress versionLow value. Attackers scan for vulnerable plugins, not version numbers.
Turn off debug output on live sitesStill important. Never leave WP_DEBUG_DISPLAY on in production.
Strong passwordsStill essential. Add 2FA on top.
Monitor or disable user registrationStill valid. Only allow it if you need it.
Secure FTPStill valid. Use SFTP or SSH keys.
Admin over SSLNow the default. Run the whole site on HTTPS.
Protect wp-config.phpStill valid on Apache. Managed hosts usually block it for you.

A few settings worth adding to wp-config.php

These go above the line that says “That’s all, stop editing!”

// Turn off the theme and plugin file editor in WP Admin
define( 'DISALLOW_FILE_EDIT', true );

// Never show PHP errors to visitors
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_DISPLAY', false );

If you use the REST API or connect apps to your site, use Application Passwords (Users > Profile) instead of sharing your real password. You can revoke one without touching your login.

XML-RPC: block it unless you need it

xmlrpc.php is a favorite target for password guessing. If you don’t use the WordPress mobile app or a service that depends on it, block it. My .htaccess guide has the Apache rule. Jetpack does use XML-RPC, so test after blocking it if you run Jetpack.

What your host should handle for you

This is the biggest change since 2012. A good managed WordPress host now does a lot of this list for you, which is a big part of why I moved client sites off cheap shared hosting.

  • Pressable includes Jetpack Security on every plan, plus daily backups. I walk through restores in my Pressable backups post.
  • WP Engine blocks a lot of bad traffic at the platform level and offers Global Edge Security as an add-on. It also runs automatic backups, which I cover in WP Engine backups.

Both hosts give you SFTP and SSH access instead of plain FTP. On WP Engine, see my guides to SFTP and SSH keys. Plugin updates are where most of the risk lives, and WP Engine’s Smart Plugin Manager can update them for you and roll back if something breaks.

Older PHP versions stop getting security fixes, too. If your site is still on PHP 7.x, read how to change your PHP version before anything else.

Want security handled at the host level? Every Pressable plan includes Jetpack Security, daily backups, and a 30-day money-back guarantee.

Other things to worry about

  • Plugins. Even up-to-date plugins can carry risk. Keep the count low and read my checklist for choosing a WordPress plugin.
  • Your own computer. A compromised laptop leaks saved passwords and SFTP logins. Keep it updated and scanned.
  • Other admins. One person with a weak password undoes everything else on this list.

FAQ

What is the most important WordPress security step?

Keeping WordPress core, plugins, and themes updated. Outdated plugins are the most common way WordPress sites get hacked.

Do I need a WordPress security plugin?

Not always. On a managed host with a firewall, malware scanning, and backups, a heavy security plugin often duplicates what the host already does. On basic shared hosting, a security plugin is worth adding.

Should I change the WordPress database table prefix?

On a new install it does no harm. On an existing site the benefit is small and the risk of breaking something is real, so I don’t bother.

Should I disable XML-RPC?

Yes, unless you use the WordPress mobile app, Jetpack, or another service that needs it. It is a common target for password guessing attacks.

Is hiding the WordPress version number worth it?

Not much. Automated attacks look for vulnerable plugins directly, so hiding the version adds little real protection.

Related posts