Protecting a WordPress site takes multiple layers of defense: constant updates of core, theme and plugins, strong passwords with two-factor authentication, users with only the permissions they need, a web application firewall (WAF), backups following the 3-2-1 rule and monitoring that flags anomalies immediately. No single measure is enough on its own.
Most attacks on WordPress are not targeted: they are automated scripts looking for vulnerable versions of well-known plugins or weak passwords. This is an advantage, because it means a good method eliminates most of the risk. Here are the 12 measures we apply in NEXO projects.
Updates and components
1. Update core, theme and plugins
It's the most important measure. Vulnerabilities are discovered constantly and fixed in new versions: an outdated plugin is an open, documented door. Minor and security updates to core can be automatic; theme and plugin updates need a method: backup, staging test for major updates, verification after release.
2. Install only reliable components, and few of them
Every plugin is code running on your server. Choose components from the official WordPress.org directory or from well-known developers, with recent updates and active support. Never use "free" premium themes or plugins downloaded from unofficial sites: they are one of the most common ways malware gets in. Delete (don't just deactivate) whatever you don't use. We cover this in WordPress plugins: which ones you really need.
3. Use a supported PHP version
Unsupported PHP versions no longer receive security patches. Moving to a recent version must be tested, but it's necessary: it also improves speed.
Logins and users
4. Strong, unique passwords
Every user must have a long password not reused anywhere else. A password manager solves the problem of remembering them. The same goes for access to hosting, the database, FTP or SFTP and the email linked to the administrator.
5. Two-factor authentication (2FA)
With 2FA, in addition to the password you need a code generated by an app on your phone or a security key. Even if the password is stolen, access stays blocked. It should be enabled at least for administrators and editors; it's managed with dedicated plugins or at the hosting level.
6. Minimal roles and permissions
Not everyone needs to be an administrator. People who write articles can be authors or editors; whoever runs the store can have a dedicated role. Remove accounts of former employees and vendors, and avoid predictable usernames like "admin".
7. Protect the login page
Limiting failed login attempts blocks brute-force attacks. A privacy-friendly CAPTCHA or restricting the admin area by IP address is also useful, when logins always come from the same places. If you don't use XML-RPC (some apps and integrations need it), consider disabling it.

Server and configuration
8. Web application firewall (WAF)
A WAF (Web Application Firewall) filters malicious requests before they reach WordPress: SQL injection attempts, cross-site scripting, automated scans. It can work at the network or DNS level, as services like Cloudflare or Sucuri do, or as a plugin inside WordPress, like Wordfence. The first blocks traffic before it consumes server resources; the second knows the application context better. They're often used together.
9. Secure configuration of WordPress and the server
- HTTPS everywhere, with a valid certificate and redirection from HTTP.
- Disable the file editor in the admin panel (the DISALLOW_FILE_EDIT constant in wp-config.php): if someone gets in as an administrator, they can't edit the code from there.
- Correct file and folder permissions; wp-config.php not accessible from the web.
- Prevent PHP files from executing in the uploads folder.
- HTTP security headers (for example HSTS, X-Content-Type-Options, a carefully tuned Content Security Policy).
- SFTP instead of plain-text FTP.
10. Hosting with isolation and updates
Good hosting updates the operating system, isolates accounts from each other, offers backups and often a malware scan. On poorly managed shared hosting, one compromised site can infect the others on the same account. How to choose: WordPress hosting.
Recovery and control
11. Backups following the 3-2-1 rule
The 3-2-1 rule says: three copies of the data, on two different media, one of them off-site. For a website, this means the production data, a backup on the hosting and one on independent external storage (a cloud provider other than the hosting provider). Backups must include files and database, be automatic, be kept for a sufficient period and, above all, be tested: a backup that has never been restored is just a hope.
12. Monitoring and logs
Monitoring uptime, file changes, new admin users and malware scans lets you notice a problem in hours instead of weeks. Add the site to Google Search Console: among other things, it alerts you if Google detects malware or compromised content.
Summary table
| Measurement | Protects against | Frequency |
|---|---|---|
| Updates | Known vulnerabilities | Weekly or on release |
| 2FA and strong passwords | Credential theft | Once, then check |
| Minimum roles | Damage from compromised accounts | Whenever staff changes |
| WAF | Automated and targeted attacks | Always on |
| 3-2-1 backups | Data loss, ransomware, errors | Daily, periodic test |
| Monitoring | Undetected compromises | Continuous |
Where to start if the site is already live
If the site has been around for a while and nobody has ever checked it, there's no need to apply everything in one day. A reasonable order is this:
- a full backup with an off-site copy, before touching anything;
- changing passwords and enabling 2FA for administrators;
- review of users and removal of unnecessary accounts;
- updating core, theme and plugins, starting with those with known vulnerabilities;
- removal of unused plugins and themes, including old copies of the site in subfolders;
- activation of the WAF and monitoring;
- a review of the server and hosting configuration.
The first three steps take little time and already reduce the risk a lot. The others should be planned, ideally in staging, so as not to disrupt the site.
Security and privacy: a legal issue too
A website that collects personal data (contact forms, customers, orders) is subject to the GDPR. In the event of a personal data breach, the data controller must assess whether to notify the Italian Data Protection Authority (Garante), normally within 72 hours of becoming aware of it. Having documented security measures is also a way to demonstrate due diligence.
How we work at NEXO
On the WordPress sites we design and maintain, security is part of the project, not an add-on: a few carefully chosen plugins, server configuration, 2FA, WAF, off-site backups and monitoring. With WordPress maintenance we keep everything updated and checked. And if the damage is already done, the procedure is in hacked WordPress site: what to do right away. The same approach applies to our custom-built websites.
Frequently asked questions
Is a security plugin enough?
No. A security plugin is useful for an application firewall, scans and login protection, but it doesn't replace updates, external backups, strong passwords and well-managed hosting.
Should I enable automatic plugin updates?
For simple, reliable plugins they can be a good choice. For critical components such as e-commerce, page builders or payment integrations, it's better to update in a controlled way with a backup and verification.
Does changing the login URL help?
It reduces the noise from automated attempts, but it's not real protection. The effective measures are 2FA, login attempt limits and strong passwords.
How often should you back up?
It depends on how much the site changes: for a brochure site a daily backup may be enough, while an e-commerce store with many orders needs a higher frequency or continuous database backup.
Want to know how well protected your WordPress site is? Message us on WhatsApp or by email: we'll run a check and tell you clearly what to fix first.


