How to secure a WordPress site: the 2026 checklist

Most WordPress security checklists are a list of 30 equal-looking tips. This one is in the order that matters, based on how the sites we clean up actually got hacked in 2026. Everything here is free, and most of it takes a few minutes.

By the Moatline team at Next Nova Technologies · Published 7 November 2026 · 8 min read

Not sure how your site looks from outside?See what your visitors and Google see right now. Free, no sign-up, about 20 seconds.
Check my site free

Short answer

  • Most hacks start with an out-of-date plugin, a stolen password or software from an unofficial source.
  • Do today: update everything, remove admins you don’t know, turn on two-factor login, block PHP in uploads.
  • Then: off-site backups kept 30 days, and a weekly malware scan. All of it is free.

If your site is already showing spam, redirects or warnings, clean it first with what to do when WordPress is hacked. Hardening a hacked site leaves the attacker’s back door in place.

The 10-minute version

If you only do five things today, do these. They would have stopped most of the hacks we cleaned up this year.

  1. Update every plugin and theme, and delete the ones you don’t use.
  2. Check your list of administrators and remove anyone you don’t recognise.
  3. Turn on two-factor login for every administrator.
  4. Block PHP in the uploads folder and web access to wp-content/upgrade.
  5. Make sure you have a backup stored off the server, from before today.

The free Moatline Malware Scanner checks your site for all of these on its Malware Scanner → Advisor page and fixes most with one click.

1. Keep plugins, themes and WordPress updated

Out-of-date plugins are the single biggest cause of hacked WordPress sites. Once a fix is public, attackers compare the old and new code to work out the flaw, so the gap between “fixed” and “attacked” can be days.

  • Update weekly at least, and the same day when a plugin you use is on our list of plugins under active attack. Our monthly plugin security updates you shouldn’t skip lists the fixes to install first.
  • Turn on automatic updates for well-maintained plugins (Plugins → Enable auto-updates). Keep backups so you can roll back if one breaks something.
  • Delete plugins and themes you don’t use. Deactivated plugins can still be attacked, because their files are still on the server. Keep one default theme as a fallback and delete the rest.
  • Replace abandoned plugins. A plugin with no update for two years, or one closed on WordPress.org, won’t get security fixes.
  • Check paid plugins separately. Premium plugins only show updates while their license is active.

2. Protect your logins

Bots try passwords on every WordPress site, all day. Stolen passwords from other breaches are the second most common way in.

  • Use a unique, long password for every admin account, stored in a password manager. Never reuse your email or hosting password.
  • Turn on two-factor login for administrators. Moatline includes it free: each admin sets it up under Users → Profile with any authenticator app.
  • Limit failed logins. Moatline locks an address out for 20 minutes after 5 wrong tries.
  • Hide usernames from scanners. Bots read them from /?author=1 and the REST API, then only need the password.
  • Consider a private login address if only a few people log in. It doesn’t stop a targeted attacker, but it removes almost all bot traffic. Write the new address down.

3. Fewer admins, smaller roles

Every administrator account is a full key to the site. Attackers who get in almost always create one of their own, often hidden from the Users screen.

  • Review your administrators once a month and remove old developers, agencies and staff who have left. See how to check for hidden admin users.
  • Give people the smallest role that works: Editor for content, Shop Manager for orders, Author for writers.
  • Write and edit posts with an Editor account, not your admin one. Some 2026 attacks wait for a signed-in administrator to open a page, then install a plugin through their browser, as in the TRUST#GRAFT fake Cloudflare check.
  • Check Settings → General. “New User Default Role” should be Subscriber, and “Anyone can register” should be off unless you run a shop, course or membership site.

4. Control what gets installed

2026 has been the year the update itself became the attack. Rank Math PRO, UpdraftCentral keys and at least five other plugins sent malicious code through their normal update channel. See our timeline of WordPress supply-chain attacks.

  • Only install from WordPress.org or the developer’s own site. “Nulled” or free copies of paid plugins nearly always contain a backdoor.
  • Be wary of plugins you didn’t install. Fake security, cache and branding plugins are a favourite hiding place. See fake WordPress security plugins.
  • Lock plugin installs when you aren’t working on the site. Moatline’s Lock blocks new plugins, theme uploads and new administrators until you unlock it, so a stolen login or a malicious script can’t add a backdoor.
  • Turn off the built-in file editor. It lets anyone with an admin login edit PHP from the browser. Turn it off in Moatline’s Settings, or add define( 'DISALLOW_FILE_EDIT', true ); to wp-config.php.

5. Close the folders attackers use

  • Block PHP in wp-content/uploads. Uploads only needs images and documents. With PHP blocked, an uploaded web shell can’t run.
  • Block web access to wp-content/upgrade. WordPress never opens it from the web. The WordPress 7.1.4 flaw let attackers run code there during updates, and over 240,000 attempts have been blocked since October.
  • Set sensible file permissions: 644 for files, 755 for folders, and 600 or 640 for wp-config.php. Never 777.

Moatline adds the first two rules for you on Apache and LiteSpeed, and shows the rule to copy on Nginx.

6. Turn off what you don’t use

  • XML-RPC: an old remote-access system used for password guessing and pingback attacks, including the HTTP2Shell (Brotli) server flaw. Turn it off unless you use Jetpack or a mobile app that needs it. Moatline can allow it for Jetpack only.
  • Pingbacks and trackbacks: turn them off in Settings → Discussion.
  • Unused accounts, plugins and themes: delete them rather than leaving them deactivated.

7. Hosting and PHP

  • Use a PHP version that still gets security fixes. In late 2026 that means PHP 8.2 or newer, and 8.2’s fixes end on 31 December 2026, so plan a move to 8.3 or newer. Your host’s control panel shows and changes it.
  • Keep sites separate. On one hosting account, one hacked site can infect all the others. Give important sites their own account, or at least their own database user.
  • Use HTTPS everywhere. It protects logins on public Wi-Fi. It doesn’t stop hacking on its own.
  • Pick a host that patches its servers and tells you when something goes wrong. Server software has its own flaws, as the PHP2Shell and Brotli flaws showed this year, and you can’t fix those from WordPress.

8. Backups you can actually restore

  • Store backups off the server, for example in Google Drive, Dropbox or S3. Malware that deletes files often deletes local backups too.
  • Back up daily if the site takes orders or posts often, weekly if it rarely changes.
  • Keep at least 30 days. Most infections we clean had been on the site for weeks before anyone noticed, so last night’s backup may already be infected.
  • Test a restore once, on a staging copy. A backup you’ve never restored is a guess.

If the worst happens and there’s no backup, a site can sometimes be rebuilt from its database, but it’s a lot more work.

9. Find out fast

No site is impossible to hack. What matters is noticing in hours, not months.

  • Scan for malware weekly. How to scan WordPress for malware covers what a proper scan checks. Moatline Pro adds a daily automatic scan.
  • Turn on email alerts. Moatline emails you within minutes when a new plugin is installed or a file appears in mu-plugins, the two places backdoors are usually added.
  • Add the site to Google Search Console. Google emails you if it finds hacked content or malware, often before you would notice. See “This site may be hacked” in Google.
  • Check the site from outside now and then, logged out and on a phone. Some malware hides from logged-in admins. Our free online check shows what visitors and Google see.

What doesn’t help much

These turn up on most checklists but do little against real attacks. They’re fine to do, just don’t count on them.

  • Changing the database prefix from wp_. Attacks that reach your database read the prefix from wp-config.php.
  • Hiding the WordPress version. Bots try every exploit on every site anyway.
  • Renaming the “admin” user on its own. It helps a little, but a strong password and two-factor login matter far more.
  • Installing several security plugins. They overlap, conflict and slow the site. One good one, set up properly, is better.

Don’t want to do this yourself? Our team cleans hacked WordPress sites every week: WordPress malware removal service, from $45, usually done within 24 hours.

Frequently asked questions

How do I secure a WordPress site for free?
Everything on this checklist is free: updates, strong passwords with two-factor login, removing extra administrators, blocking PHP in uploads, turning off XML-RPC, off-site backups and a weekly malware scan. The free Moatline plugin does most of the WordPress side in a few clicks from its Advisor page.
Is WordPress secure?
WordPress itself is well maintained and rarely the way in. Almost every hacked site we clean was broken into through an out-of-date plugin or theme, a stolen or guessed password, or software from an unofficial source. Fix those and WordPress is as safe as any platform.
Do I need a security plugin?
One good security plugin helps, because it can do things WordPress can’t on its own: scan for malware, limit login attempts, add two-factor login and warn you about vulnerable plugins. Use one, not several: two security plugins often conflict and slow the site down.
Does an SSL certificate make my site secure?
No. SSL (the padlock) encrypts traffic between visitors and your site, which protects logins on public Wi-Fi. It doesn’t stop someone exploiting a plugin or guessing a password. You need it, but it isn’t security on its own.
How often should I check my site’s security?
Update plugins at least weekly, scan for malware weekly, and review your administrator list once a month. Check again straight away whenever a plugin you use is in the news.
What if my site is already hacked?
Don’t start with hardening. Clean the site first, or the attacker keeps a way back in. Follow our guide to what to do when your WordPress site is hacked, then come back to this checklist.

Scan your site for free

Moatline checks files, the database and page-builder content. Nothing changes unless you click a button.

More guides

All guides →