A useful WordPress security checklist covers seven areas: who can log in and how, whether every plugin and theme is genuinely receiving updates, how the server and files are locked down, which plugins should not be there at all, backups you have actually restored, monitoring that tells you when something changes, and a written plan for the day something goes wrong. Most of the checklists that rank for this search list 25 or 30 items with equal weight. In the cleanups we have documented, the ways in were ordinary ones, so this list is ordered by risk rather than by how often an item appears elsewhere, with a one-line reason and the exact setting or command for each item.
How to use this WordPress security checklist
Work through it top to bottom on a staging copy first where a change could break something, and keep a note of what you changed. Each item says why it matters and how to do it. Where a WP-CLI command is given, run it from the WordPress root on the server, and take a full backup of files and database before changing anything.
The items are grouped by area rather than numbered, because the order that matters is the order of risk. If you only have an hour, do the accounts and updates sections. Those two cover the ways in from both of the cleanups described below: a valid password used by someone who should not have it, and a plugin that stopped receiving updates months ago without anyone noticing.
Items that matter less than their reputation
Several items appear on almost every list and do very little on their own. The official Hardening WordPress guide calls security through obscurity "generally an unsound primary strategy". That applies to these:
- Changing the database table prefix. The official guide says it can block some SQL injection attacks. It does not fix the vulnerable plugin that allowed the injection, and changing it on a live site is risky. Do it on new installs; do not lose sleep over it on old ones.
- Hiding the WordPress version. Automated attacks try their exploits against every site regardless of what version it reports. Keeping the version current matters; hiding it does not.
- Moving the login URL. It cuts log noise from bots, which is pleasant. It does not protect an account whose password has leaked, and the real fixes for that are below.
Accounts and login
In one emergency cleanup across three sites, the access logs showed a valid administrator password used successfully on the first attempt, followed by an uploaded plugin and a file manager. No vulnerability was involved. The password had been exposed somewhere else. That is why this section comes first.
- One named account per person, no shared logins. Why: a shared "admin" login cannot be revoked for one person, and the logs cannot tell you who did what. How: create an account for each person, then delete the shared one and attribute its content to a real user.
- Least privilege. Why: every administrator account is a full key to the site, including the ability to upload plugins. How: content writers get Editor or Author, shop staff get Shop Manager, and only the people who maintain the site are Administrators.
- Two-factor authentication for every administrator. Why: it is the item that would have stopped the stolen-password attack above. The official brute force guidance recommends it for all administrators and notes that WordPress core does not ship 2FA, so it comes from a plugin or your identity provider.
- Review the administrator list monthly. Why: attackers add accounts, and in the same case study they quietly demoted the real administrators to Author so the owners could log in but not act. How:
wp user list --role=administrator, and remove anyone you do not recognize, including former contractors. - Check application passwords. Why: since WordPress 5.6, users can create application passwords for API access. They are separate credentials, so an attacker who creates one has a way back in that is easy to overlook when you reset the main password. How: Users, Profile, Application Passwords, and revoke anything nobody can explain.
- Rate limit the login page. Why: brute force traffic wastes server resources even when it fails. How: at the firewall or web server where you can, because the official guidance notes that plugin-level limits still consume PHP for every attempt.
# List administrators with their email and registration date
wp user list --role=administrator --fields=ID,user_login,user_email,user_registered
# List application passwords for one user (replace 1 with the user ID)
wp user application-password list 1
Updates and licenses: the WordPress security check most lists miss
"Keep everything updated" is on every list. What the lists miss is that the dashboard can show a plugin as up to date when it is not receiving updates at all.
- Register every premium plugin and theme license. Why: premium products deliver updates through their own license check, and an unregistered or expired license fails quietly. In a cleanup where the host had found one malicious plugin and we found eleven, the most likely way in was a known upload flaw in a theme's companion plugin whose updates had silently stopped for ten months because its license was never registered. How: list your premium plugins, compare the installed version with the vendor's current version, and register each license.
- Remove plugins the author has abandoned. Why: a plugin with no release in a year or more will not get a fix when a flaw is published. How: check each plugin's "last updated" date on WordPress.org or the vendor's changelog, and replace stale ones.
- Keep core minor updates automatic. Why: minor releases carry security fixes. How: this is the WordPress default; check that nothing in
wp-config.phpsetsAUTOMATIC_UPDATER_DISABLEDorWP_AUTO_UPDATE_COREtofalseunless someone is applying updates by hand on a schedule. - Run a supported PHP version. Why: PHP branches stop receiving security fixes at end of life. How: Tools, Site Health shows the version; your host sets it.
- Test updates on staging for anything that takes money. Why: a store or membership site that breaks on update loses revenue, which tempts people to stop updating. How: update staging, place a test order, then update live.
# Which plugins and themes have updates waiting
wp plugin list --update=available
wp theme list --update=available
# Which version of core is installed
wp core version
Server and files: the WordPress hardening settings that matter
These are the WordPress hardening steps we applied in the cleanups described here. They do not replace updates and strong accounts, but they limit what an attacker can do with a foothold.
- Turn off the built-in file editor. Why: with it on, any administrator session can rewrite theme and plugin PHP from the browser. How: the constant below. The official guide describes it as equivalent to removing the edit_themes, edit_plugins and edit_files capabilities.
- Force HTTPS for logins and the admin. Why: passwords and cookies should never travel in the clear. How:
FORCE_SSL_ADMIN, below. - Consider DISALLOW_FILE_MODS on sites with a deployment process. Why: it blocks installing and updating plugins and themes from the dashboard, which also stops an attacker with an admin login from uploading a plugin. How: only use it when someone applies updates outside the dashboard, because it also turns off background automatic updates, including core security releases.
- Block PHP from running in uploads. Why: the uploads folder must be writable, so it is where malicious PHP lands. Nothing legitimate needs to execute there. How: the nginx or Apache rule below.
- Correct permissions and ownership. Why: files writable by the web server can be rewritten by any compromised plugin. How: the official guide gives 755 for directories, 644 for files, and 400 or 440 for
wp-config.php. Owner matters as much as mode; ask your host which system user PHP runs as before changing either. - Use SFTP or SSH, never plain FTP. Why: FTP sends the password unencrypted. How: most hosts offer SFTP on the same credentials; disable the FTP account.
// wp-config.php, above the "stop editing" comment near the end
define( 'DISALLOW_FILE_EDIT', true );
define( 'FORCE_SSL_ADMIN', true );
// Optional, only if updates are applied outside the dashboard:
// define( 'DISALLOW_FILE_MODS', true );
For nginx, this rule is from the official WordPress nginx documentation. Place it before the block that passes .php files to PHP, because nginx uses the first regular expression location that matches.
# Deny any .php file inside uploads (and multisite files)
location ~* /(?:uploads|files)/.*.php$ {
deny all;
}
For Apache 2.4, create wp-content/uploads/.htaccess with:
# Refuse to serve or run PHP files from uploads
<FilesMatch "(?i).(phpd?|phtml|phar)$">
Require all denied
</FilesMatch>
For permissions, the official guide's commands reset everything at once. Back up first and check ownership with your host, because the wrong owner can stop WordPress updating itself.
# From the WordPress root. Back up before running.
find . -type d -exec chmod 755 {} ;
find . -type f -exec chmod 644 {} ;
chmod 440 wp-config.php
What about XML-RPC?
If nothing you use needs it (the Jetpack plugin and some mobile publishing apps do), block xmlrpc.php at the web server or firewall, as the official brute force guide suggests. Be careful with the popular one-line fix: the xmlrpc_enabled filter only switches off the methods that require authentication. Pingbacks and other unauthenticated methods keep working.
Plugins and files to remove
Every plugin is code that runs on every request, written by someone you have never met. Removing what you do not use is the cheapest security work there is.
- File manager plugins. Why: they give anyone with an admin session full read and write access to the server's files. In the stolen-password case, the attacker's second move was to install one. How: delete them and use SFTP instead.
- Deactivated plugins and unused themes. Why: deactivated code still sits on the server and can still be reached directly if it is vulnerable. How: delete, do not just deactivate. Keep one default theme as a fallback.
- Nulled or "free premium" plugins. Why: they are a common way malware is distributed, and they never receive real updates. How: replace with licensed copies from the vendor.
- Old backups, copies and test folders in the web root. Why: folders like
old/,backup/orsite-copy/are often a complete, outdated WordPress install nobody patches. In the stolen-password case an old backup folder on the server was infected too. How: move backups off the server and delete abandoned copies. - Overlapping security plugins. Why: two firewalls fighting each other can lock you out and make neither reliable. How: pick one.
Backups you have actually restored
"Back up your site" is on every list. A backup you have never restored is a hope, not a backup.
- Daily, off-site, files and database. Why: a backup stored on the same server is lost or infected along with the site. How: a backup plugin or host feature that sends copies to separate storage.
- Retention long enough to reach before the compromise. Why: in the cleanup with eleven malicious plugins, the error logs showed the malware already running on the previous host two months before the site moved, and the move carried it across. A week of backups from that period would all have been infected. The official hardening guide recommends keeping snapshots from both before and after a compromise. How: keep at least 30 days, plus monthly copies.
- A restore test, at least quarterly. Why: archives fail silently, and the restore steps are not the time to learn. How: restore the latest backup to a staging site and click through it, including a test order on a store.
- Protect the backups themselves. Why: a backup contains your database, with customer data and password hashes. How: encrypted storage, access limited to the people who need it.
Monitoring that tells you something changed
Compromises are often found late. In the eleven-plugin case, the error logs showed the malware running two months before the site changed host, long before anyone acted on it. Monitoring shortens that gap.
- File integrity checks. Why: modified core or plugin files are a strong sign of compromise. How: WP-CLI compares core and WordPress.org plugins against official checksums. Premium plugins are not on WordPress.org, so this check cannot cover them; a security plugin's scanner or a comparison against a fresh vendor download can.
- Scheduled tasks. Why: in the stolen-password case the malware rebuilt itself from scheduled tasks every time part of it was removed. How: list them and look for hook names you do not recognize.
- An activity log. Why: you want to know when a user, plugin or setting changed, and by whom. How: an audit log plugin that records logins, user changes and plugin installs.
- Search Console. Why: Google reports hacked content and malware in the Security Issues report, often before you notice. How: verify the site and make sure the alerts reach a monitored inbox.
- Uptime and SSL expiry. Why: an outage or an expired certificate is often the first visible sign. How: any external uptime monitor.
- Keep your access logs. Why: in the eleven-plugin cleanup we could only say "most likely" about the way in, because the host's access logs for that period no longer existed. How: ask your host how long logs are kept and copy them somewhere if it is only days.
# Compare core files with the official checksums
wp core verify-checksums
# Same for plugins from WordPress.org (premium plugins are skipped)
wp plugin verify-checksums --all
# Scheduled events and the hooks they run
wp cron event list --fields=hook,next_run_relative,recurrence
If all of this sounds like a job for someone else, it is what our maintenance plans cover, from $59 a month: tested updates, daily off-site backups, uptime, SSL and security monitoring.
An incident plan, written before you need it
The worst time to find out who has the hosting password is during an attack. Write one page now, and keep it outside the website.
- Who to call and where the keys are. Hosting login, domain registrar, DNS, the developer, and the payment gateway account.
- Take the site offline cleanly. A maintenance page protects visitors while you work.
- Preserve evidence first. Copy the files, database and access logs before cleaning anything. Without logs you are guessing at how they got in, and a guess leaves the door open.
- Clean in one pass. In the stolen-password case, earlier piece-by-piece cleanups never stuck because the malware repaired itself. Remove every part together: fake plugins, scheduled tasks, backdoors and modified configuration.
- Rotate every credential. WordPress passwords, application passwords, security keys, the database password, hosting, SFTP and any API keys stored in the site.
- Close the way in, then watch. Update or remove the vulnerable component, apply the hardening above, and scan again before going live. In the eleven-plugin case, a final scan before relaunch found one more hidden payload inside a legitimate plugin.
# New security keys: logs every user out of every session
wp config shuffle-salts
# End all sessions for one user (repeat per user, or loop over the list)
wp user session destroy 1 --all
Changing the security keys logs everyone out, including customers mid-checkout. On a store, do it at a quiet hour and tell your team first.
If you are already in the middle of an incident, our WordPress site rescue service starts with a $300 written diagnosis and then a fixed price for the repair, usually started the same or next working day.
Common questions
Is WordPress secure?
WordPress core is maintained by a dedicated security team and ships fixes quickly, including automatic minor updates. Most compromised WordPress sites are not hacked through core. They are entered through an outdated or abandoned plugin, a leaked password, or a server misconfiguration, which is what this checklist addresses.
Do I need a security plugin for WordPress?
One good one is worth having for its firewall, login protection, scanner and alerts. It is not a substitute for updates, named accounts with two-factor authentication, and tested backups. Install one, not several, because overlapping security plugins can conflict and lock you out.
Should I change the WordPress database prefix?
On a new install, yes, it costs nothing. On an existing site, it is low priority. The official hardening guide says it can block some SQL injection attacks, but the real fix for SQL injection is updating or removing the vulnerable plugin, and renaming tables on a live site carries its own risk.
Should I disable XML-RPC in WordPress?
If nothing you use depends on it, block xmlrpc.php at the web server or firewall. Jetpack and some publishing apps need it, so check first. The xmlrpc_enabled filter does not fully disable it; it only turns off the methods that require a login.
How do I know if my WordPress site has been hacked?
Common signs are administrator accounts you do not recognize, spam pages showing in Google for your domain, redirects that only happen on mobile or from search results, a Security Issues warning in Search Console, and core files that fail wp core verify-checksums. If you see any of these, preserve the logs before you start deleting things.
How often should I go through a WordPress security checklist?
Review accounts and updates monthly, test a backup restore quarterly, and run the full checklist once a year or after any change of developer, host or team. A maintenance plan turns most of it into routine work rather than a project.
Next step
If your site is already showing signs of compromise, start with our WordPress site rescue: a written diagnosis that finds how they got in, then a fixed price to clean and harden it. If you would rather have the checklist above applied and kept up for you, start a project and a senior developer will come back with a written scope.
Want a senior developer to look at your site?
Tell us what you need. You get a written scope and a fixed price, usually within one business day.


