WordPress security checklist: 12 essential settings to secure a small business site
WordPress sites rarely get hacked through the core software. It is almost always a forgotten plugin, a weak admin account or a default setting. Here are the 12 settings that close those doors, and what to do if the damage is already done.

One Monday morning, your company website starts redirecting to a fake online pharmacy. Nobody has touched anything. The culprit: a contact form plugin installed three years ago by a former intern, never updated, whose vulnerability was published on Friday evening. The weekend was enough.
WordPress runs about 40% of all websites according to W3Techs, which makes it the most rewarding target on the internet. The good news: the vast majority of hacks come through well-known doors that simple settings can close. Here is the annotated checklist, in the order we would apply it to a small business site.
Why WordPress sites get hacked
The WordPress core is almost never the problem. The annual report from Patchstack, a WordPress security specialist, recorded 11,334 new vulnerabilities in the ecosystem in 2025, 42% more than in 2024. Only 6 were in the core, all low priority.
Two more figures from the same report explain the urgency. First, 46% of vulnerabilities had no fix from the developer by the time they were made public: updating is not always enough, and sometimes the plugin has to go. Second, speed: roughly half of high-impact vulnerabilities are exploited within 24 hours.
The 12-point checklist
| No. | Setting | Effort | Priority |
|---|---|---|---|
| 1 | Core, plugins and themes up to date, automatic updates on | Low | Now |
| 2 | Abandoned, unused or pirated plugins removed | Low | Now |
| 3 | Few named admin accounts, all with MFA | Low | Now |
| 4 | Login attempts limited | Low | Week 1 |
| 5 | XML-RPC disabled if unused | Low | Week 1 |
| 6 | Roles kept to the bare minimum | Medium | Week 1 |
| 7 | Off-site, tested backups | Medium | Week 1 |
| 8 | HTTPS everywhere, HSTS and security headers | Medium | Month 1 |
| 9 | File editor disabled, wp-config.php protected | Low | Month 1 |
| 10 | Correct file permissions, no PHP in uploads | Medium | Month 1 |
| 11 | Supported PHP version, reputable host | Medium | Month 1 |
| 12 | Web application firewall and monitoring | Medium | Month 1 |
Settings 1 to 3: the main way in
1. Update everything, automatically
Patch managementPatch managementThe process of inventorying software, tracking published security patches and deploying them within timeframes that match the risk, without breaking production. comes first, by a long way. Since WordPress 3.7, minor and security releases of the core install themselves by default. Since WordPress 5.5 (2020), you can switch on automatic updates for each plugin and theme from the Plugins and Themes screens: do it for everything that is not business-critical. For the rest (shop, payments), set a weekly routine and apply security fixes straight away.
2. Clear out your plugins
Every plugin is third-party code running with your site’s permissions: a software supply chainSupply chain attackAn attack that compromises a trusted supplier, service provider or software component in order to reach all of its customers in turn. in its own right. Delete (not just deactivate) any plugin you do not need, and be wary of those the WordPress.org directory flags as untested with the last three major releases: they may no longer be maintained. A plugin closed in the directory for a security issue must be replaced.
Ban “nulled” plugins and themes, meaning paid products cracked and handed out for free: they regularly ship with a backdoor, and they never receive updates anyway.
3. Few, well-protected admin accounts
- No more than two or three administrators, each with a named account; never a username of “admin”.
- A long, unique password kept in a password manager.
- Multi-factor authenticationMulti-factor authentication (MFA)A login that requires at least two proofs of identity of different kinds (something you know, something you have, something you are), so that a stolen password is no longer enough. for every privileged account. WordPress does not include it: use a reputable plugin or single sign-on through your identity provider. Our article on MFA for small business covers which methods to choose.
- Remove the accounts of former contractors and staff on the day they leave.
Settings 4 to 6: the login page and permissions
4. Limit login attempts
WordPress does not limit them by default. Brute-forceBrute-force attackAn attack that systematically tries large numbers of passwords until it finds the right one, either online against a login service or offline against stolen password hashes. and credential-stuffing attacks hammer wp-login.php and xmlrpc.php around the clock. The official documentation recommends rate-limiting as close to the edge as possible (web application firewall, CDN or web server), or failing that with a plugin. If your administrators work from fixed IP addresses, you can restrict the login page to them (Apache 2.4):
<Files "wp-login.php">
Require ip 203.0.113.15 203.0.113.16
</Files>
5. Disable XML-RPC if you don’t use it
xmlrpc.php is a legacy endpoint, on by default, mostly used by some mobile apps and connected services. It lets an attacker try many passwords in a single request. The xmlrpc_enabled filter only switches off authenticated methods; to close it completely, block the file:
<Files "xmlrpc.php">
Require all denied
</Files>
If a service needs it, filter it at the web application firewall and rate-limit it hard.
6. Minimal roles
A single WordPress site offers five roles: administrator, editor, author, contributor and subscriber. Apply least privilegeLeast privilegeThe principle that every user, application or service receives only the rights strictly needed for its job, and only for as long as it needs them.: a copywriter does not need to be an administrator, and neither does your agency outside its assignments. Give it a temporary account, then disable it.
Settings 7 to 10: backups, encryption and files
7. Backups away from the server
Back up the database and the wp-content folder daily, keep several versions and store at least one copy outside your hosting account, following the 3-2-1 backup rule. Test a restore at least once a quarter: a backup that has never been restored is a gamble.
8. HTTPS everywhere, HSTS and security headers
The whole site must be served over HTTPS, admin area included, with a certificate that renews automatically. The HSTSHSTSA security header through which a website tells the browser to connect to it over HTTPS only, which stops an attacker from downgrading the connection to unencrypted HTTP. header then tells browsers never to fall back to HTTP. Other headers reduce the risk of clickjacking and of files being misinterpreted. On Apache with mod_headers:
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Content-Security-Policy "frame-ancestors 'self'"
</IfModule>
Only add includeSubDomains to HSTS once you have checked that every subdomain serves HTTPS. To check the result from the outside, KrakenShield’s SSL and headers audit grades your site’s HTTPS configuration from A+ to F and checks its security headers, with the fixes to apply.
9. Switch off the file editor and protect wp-config.php
By default, an administrator can edit the PHP code of themes and plugins from the dashboard, so a stolen account becomes a server takeover. Add to wp-config.php:
// Disable the theme and plugin file editor
define( 'DISALLOW_FILE_EDIT', true );
// Force HTTPS for login and the admin area
define( 'FORCE_SSL_ADMIN', true );
// Never display errors to visitors in production
define( 'WP_DEBUG', false );
The DISALLOW_FILE_MODS constant goes further by also blocking plugin installs and updates from the dashboard: keep it for sites whose updates go through a controlled deployment. Finally, deny direct access to wp-config.php at the top of the root .htaccess:
<Files "wp-config.php">
Require all denied
</Files>
10. Strict file permissions
The WordPress documentation recommends 755 for folders, 644 for files, and 440 or 400 for wp-config.php. Also block PHP execution in the uploads folder, where a file upload flaw often drops a malicious script. In an .htaccess file inside wp-content/uploads:
<FilesMatch "\.(?:php|phtml|phar)$">
Require all denied
</FilesMatch>
Settings 11 and 12: the platform and vigilance
11. Up-to-date PHP and a reputable host
WordPress recommends PHP 8.3 or later. According to php.net, versions older than 8.2 no longer receive any fixes, and PHP 8.2 stops receiving them after 31 December 2026: plan the upgrade now, after a trial run on a staging copy. Choose a host that isolates each site and offers SFTP access (never plain FTP), backups and reachable support.
12. Web application firewall and monitoring
A web application firewall (WAF)WAF (web application firewall)A filter placed in front of a website or API that inspects each web request and blocks those that look like attacks (SQL injection, XSS, abusive bots). filters known attacks and buys time between a flaw being published and your update. Check that it understands WordPress-specific flaws: in a test Patchstack ran against popular hosting companies, only 26% of attacks were blocked, and traditional defences stopped just 12% of attacks on WordPress-specific vulnerabilities.
Then keep an eye on:
- security alerts and the automatic update reports sent by email;
- new administrator accounts and unusual logins;
- modified or new files (integrity scanning by your security plugin or your host);
- Google Search Console warnings and the WordPress Site Health page.
The Web application security chapter explains how headers, WAFs and penetration tests work.
Your WordPress site has been hacked: first steps
Don’t rush to reinstall everything: you would wipe out the traces that explain the intrusion. The guidance from WordPress.org and CERT-FR, the French government’s computer emergency response team, follows this order:
- Take the site offline and put up a maintenance page.
- Preserve existing backups by copying them off the server before doing anything else.
- Keep a copy of the compromised site (files and database) and the server logs: they are your evidence.
- Tell your host, who can confirm the intrusion and check other sites on the server.
- Change every credential: WordPress accounts, hosting, SFTP and database, then regenerate the secret keys in
wp-config.phpto log everyone out. Scan administrators’ computers too: a password stolen from an infected laptop is a common way in. - Rebuild from clean sources: fresh downloads of core, plugins and themes, restore a backup from before the intrusion, then check
.htaccess, PHP files inuploadsand the admin accounts. - Close the door they used: identify the plugin or account at fault, apply the checklist above, then change the passwords a second time.
- Meet your obligations: if personal data was exposed (customers, forms, accounts), the GDPR requires you to notify your data protection authority (the CNIL in France) within 72 hours where the breach poses a risk to the people concerned. Report the crime to the police as well.
For an online shop or any site handling customer data, bring in an incident response provider rather than cleaning up alone. The Incident response chapter explains how to organise yourself.
Key takeaways
- In 2025, 91% of new vulnerabilities in the WordPress ecosystem were found in plugins and 9% in themes: the core is rarely to blame.
- The most targeted flaws are exploited within hours: automatic updates and removing unused plugins come first.
- Few administrators, all named individuals protected by MFA, and everyone on the lowest role that lets them do their job.
- A few lines in wp-config.php and .htaccess switch off the file editor, XML-RPC and PHP execution in the uploads folder.
- If the site is hacked: take it offline, preserve backups and logs, change every credential, then rebuild from clean sources.
Frequently asked questions
Is WordPress a secure CMS?
The WordPress core is well maintained and installs security releases on its own. The risk lies mainly in the ecosystem: Patchstack recorded 11,334 new vulnerabilities in 2025, 91% of them in plugins. An up-to-date WordPress with a handful of well-chosen plugins is a solid site.
How can I tell if my WordPress site has been hacked?
Common signs: a warning from Google or from visitors’ antivirus, redirects to dubious sites, pages or admin accounts you did not create, unknown PHP files in the uploads folder, spam sent from your server, or your host suspending the site. If in doubt, have the site scanned.
Do I need a WordPress security plugin?
It helps, but it does not replace the settings in this checklist. A good one limits login attempts, adds two-factor authentication, monitors files and flags vulnerable plugins. Pick a single reputable, actively maintained plugin, and first check what your host already provides.
Should I disable XML-RPC on WordPress?
Yes, if you do not use it. This legacy endpoint mainly serves older mobile apps and some connected services, and it is a favourite target for brute-force attacks. If you need it, filter it at the web application firewall and rate-limit it aggressively.
Can automatic updates break my site?
Rarely for core security releases, which have been automatic by default since WordPress 3.7. For plugins the risk exists, but it is far smaller than leaving a known flaw open. Keep a recent backup, turn on plugin auto-updates and test the most sensitive ones on a staging copy.
Sources
- Patchstack, State of WordPress Security in 2026 (updated 25 February 2026)
- WordPress Developer Resources, Hardening WordPress
- WordPress Developer Resources, Brute Force Attacks
- WordPress Developer Resources, Editing wp-config.php
- WordPress Developer Resources, Upgrading WordPress (automatic updates)
- WordPress.org, Server requirements
- PHP.net, Supported Versions
- WordPress.org, FAQ My site was hacked (updated 26 July 2026)
- CERT-FR, Website defacement: containment (CERTFR-2024-RFX-008, in French)
- W3Techs, Usage statistics of WordPress




