WordPress
WordPress security basics: the habits that stop most attacks
Security is risk reduction, not perfection. Learn the core WordPress habits: updates, strong passwords with two-step login, trusted plugins and backups.

On this page
No WordPress site is perfectly secure, and the official documentation says so plainly: security is risk reduction, not risk elimination (WordPress documentation). The goal is to make your site a harder target and to recover quickly if something goes wrong.
Know who is responsible for what
Your host looks after the server and network. You look after the application: WordPress itself, your theme, your plugins and your passwords. According to the same documentation, hacks are most often traced to the application, not the infrastructure. A good host discusses its security features openly, runs recent stable server software and offers reliable backup and recovery.
Keep everything updated
- WordPress core. Older versions are not maintained with security updates. Once a fix is released, the details of the flaw are effectively public, which makes old versions easier to attack. Automatic updates exist, so use them.
- Plugins and themes. Update them too, and delete any you do not use.
- Source. Download WordPress only from wordpress.org, and get plugins and themes from the WordPress.org repository or well-known companies, not from random "free premium" copies.
Use strong passwords and two-step login
Avoid passwords built from your name, username, company or website name, dictionary words, short passwords, or only numbers or only letters. Let a password generator create one. WordPress also shows a strength meter when you change it.
An administrator account can install malicious code that endangers the whole server, so also turn on two-step authentication. WordPress core does not include it, so you add it with a plugin or your identity provider. Our login protection guide covers this in more detail.
Limit what an attacker can do
- Use SFTP, not plain FTP, if your host supports it, so your password is not sent in the clear.
- Disable file editing in the dashboard. Adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.phpremoves the theme and plugin editor. The documentation notes it will not stop file uploads, but it may stop some attacks. - Lock down file permissions. Files should be writable only by your account, with
wp-contentas the usual exception. - Be careful with plugins that execute code from the database or that ask for write access to your files.
Consider a firewall
Firewall plugins and services filter bad traffic before it does damage. Some work inside WordPress, others at the server, and others sit in front of your site as a reverse proxy. They help, but they do not replace the basics above.
Keep tested backups
If the worst happens, a backup you can restore gets you back online. See our WordPress backup guide.
Checklist
- WordPress, plugins and themes updated
- Unused plugins and themes deleted
- Strong, unique admin password and two-step login on
- SFTP used instead of FTP
- File editing disabled in
wp-config.php - Backups taken and a restore tested
Frequently asked questions
Is my host responsible for my WordPress security?
Only partly. The WordPress documentation explains that hosts are generally responsible for the infrastructure, not for the application you install. Updates, passwords and plugins are your side.
Should I turn on two-step login?
The WordPress documentation recommends enabling two-step authentication in addition to a strong password, because an administrator account can be used to install malicious scripts.
Is a security plugin enough on its own?
No. Firewall plugins and services help filter attacks, but they sit on top of the basics: updated software, strong passwords, trusted plugins and tested backups.
Sources & references
Related reading
WordPress
WordPress backups: what to back up, how often and where to keep it
A WordPress site has two parts to back up: files and database. Learn how often to back up, where to store copies and how to restore safely.
2 min read
Web hosting
What is SSL/HTTPS and how do you get it for your website?
HTTPS encrypts the connection between visitors and your site. Learn what SSL/TLS does, how certificates are issued and the steps to enable HTTPS on your site.
2 min read
WordPress
WordPress hosting checklist: 8 things to confirm before you buy
PHP versions, caching, staging, backups and security. What a WordPress site really needs from its host, and the questions to ask before you sign up.
1 min read