Stop spam without frustrating your visitors

Create your CleanTalk account and start blocking spam — no CAPTCHA challenges and no impact on visitors.

Security Block Lists

CleanTalk Account

No credit card required • Setup takes less than a minute • Your temporary password will be sent by email.

Simple Ways to Implement All-around WordPress Security

·

WordPress powers close to 40% of all websites (W3Techs, November 2026), which makes it the most attacked CMS on the internet. Every new install gets probed within hours: bots try default logins, scan for vulnerable plugins, post spam into comment and registration forms, and look for a way to drop malware. Securing a WordPress site is still called “hardening”, and it is still a process rather than a one-time task. The difference from 2017 is that the layers have become clearer, and most of the heavy lifting can now be done by your host and two or three well-chosen plugins.

Below is a practical, layer-by-layer checklist: hosting, login, database and files, spam, monitoring, and plugins.

1. Start with the host: the layer you cannot patch yourself

Most break-ins never touch your WordPress code at all. They hit the server, the network edge or a neighbour on the same shared box. That is why the hosting choice is the single biggest security decision you make. A good host today should give you:

  • A web application firewall and DDoS protection in front of the server, not inside WordPress.
  • Isolated containers or accounts, so one compromised site cannot reach another.
  • Automatic daily backups with one-click restore.
  • Current PHP and MySQL versions, with the option to switch versions yourself.
  • Server-side malware scanning and a clear cleanup policy if something gets through.
  • Two-factor authentication and role-based access to the hosting panel.
  • Independent compliance such as SOC 2 Type II or ISO 27001, if you handle customer data.

A good example of this “security as part of hosting” approach is Kinsta’s managed WordPress hosting. Their stack sits behind Cloudflare’s enterprise firewall and DDoS protection, every site lives in its own isolated container, backups are taken daily and kept for 14 days, and the platform is SOC 2 Type II and ISO certified. Two layers added recently are worth noting: Bot Protection (June 2026, included on all plans), which uses Cloudflare bot scores to filter malicious automated traffic before it reaches PHP, and Vulnerability Protection powered by Patchstack, installed on every Kinsta site as a must-use plugin to shield known plugin and theme vulnerabilities until the official update is installed. If you would rather not manage firewalls and patches yourself, this is what you are paying a managed host for.

Whatever host you choose, turn on every security option they offer. Those features are free for you and they stop the attacks that no plugin can see.

2. Lock down the login

The login page is still the attacker’s favourite door, and brute force is still the most common attack on WordPress. The 2026 version of the checklist:

  • No “admin” username. If an old site still has it, create a new administrator with a different name and delete the old account, reassigning its content.
  • Long passphrases, not “complex” 8-character passwords. Current guidance (NIST SP 800-63B, 2025 revision) requires at least 15 characters for a password used on its own, prohibits mandatory symbol rules and forbids forced periodic password changes. Use a password manager and unique passphrases of 16+ characters.
  • Two-factor authentication for every administrator and editor. App-based codes or security keys, not SMS where you can avoid it.
  • Least privilege. Authors and editors do not need administrator rights. Review the user list quarterly and remove accounts that are no longer used.
  • Limit login attempts and block the source. After a handful of failures the IP, network or country should be blocked automatically, and you should get a notification.
  • Session timeouts for idle users and the ability to force-logout everyone after a change of passwords.
  • HTTPS everywhere. A free Let’s Encrypt certificate is standard on any decent host; make sure the login and admin pages are not reachable over plain HTTP.
  • Hide what helps the attacker. Disable detailed login error messages, stop user enumeration through ?author=1 and the REST API users endpoint, and consider moving the login URL away from /wp-login.php. These do not stop a determined attacker, but they remove the cheap wins for bots.
  • Disable XML-RPC unless a specific integration needs it. It is a common vector for brute force amplification and pingback spam.

One note on code snippets from older guides: functions like create_function(), which many 2017 tutorials recommended for hiding login errors, were removed in PHP 8. Use a security plugin or a current filter such as add_filter( 'login_errors', '__return_null' ); instead.

3. Protect the database and files

  • Use a strong, unique database password and a database user that has rights only to this site’s database.
  • Change the default wp_ table prefix on new installs. It is not a real barrier against SQL injection, but it defeats lazy automated scripts.
  • Connect over SFTP or SSH only. Plain FTP sends your password in clear text.
  • Set file permissions to 755 for directories and 644 for files, and keep wp-config.php at 600 or 640.
  • Disable the built-in theme and plugin file editor with define( 'DISALLOW_FILE_EDIT', true ); in wp-config.php.
  • Keep automatic updates on for WordPress core, and update plugins and themes within days of a release. Most 2026 incidents trace back to a known plugin vulnerability that had a patch available.
  • Delete themes and plugins you do not use. Inactive code is still attackable code.
  • Back up before every major update and test that the backup actually restores.

4. Spam is a security problem, not just an annoyance

This part was underrated in 2017 and is unavoidable now. Comment spam, fake registrations, bogus contact form submissions and spam orders are how attackers find out whether your site is maintained, plant malicious links, create accounts to escalate later, and exhaust server resources. The spam bots that do this run in normal browsers and solve CAPTCHAs, so a puzzle on the form is no longer a reliable filter and only annoys real visitors.

The approach that works is to check the sender, not the browser: the email and IP reputation, the behaviour on the page and the content of the submission. That is what CleanTalk Anti-Spam does for comments, registrations, contact forms, WooCommerce checkout and dozens of other WordPress form plugins, without CAPTCHA. Its SpamFireWall blocks known spam bots before WordPress even loads, which also takes load off the server. A side benefit for security: blocked attempts are logged with the reason, so you can see which forms are being targeted and from where.

5. Monitor continuously

Hardening without monitoring is locking the doors and never checking the windows. Set up:

  • Malware scanning of the file system, scheduled daily, with a list of changed files. Online scanners that only look at rendered pages miss backdoors in the code.
  • File integrity monitoring, so you know when core, plugin or theme files change outside an update.
  • Uptime monitoring with alerts by email or messenger: downtime is often the first visible sign of a compromise.
  • Blacklist and reputation monitoring: if Google Safe Browsing or a spam blacklist flags your domain, you want to hear it before your visitors do.
  • Audit log of administrator activity: logins, plugin installs, user changes, settings edits, with the IP and time.
  • Login notifications for successful administrator logins. A login from a new country at 3 a.m. is worth a look even if the password was correct.

Security by CleanTalk covers these for WordPress: a firewall with blocking by IP, network and country, login protection and two-factor authentication, a malware scanner with automatic cleanup, vulnerability checks, real-time traffic monitoring and security logs, plus email notifications for administrator logins. Hosts like Kinsta do part of this at the platform level; the plugin adds the application-level view inside WordPress and the alerts in your dashboard.

6. Choose plugins deliberately

A security plugin should do what the host does not: login protection, malware scan of your own files, audit log, firewall rules at the WordPress level. Do not stack three security plugins; they conflict and each adds attack surface. The same goes for anti-spam: keep one anti-spam solution active, because several anti-spam hooks on the same form regularly break submissions.

When evaluating any plugin, look at the update frequency, the number of active installs, the ratings over the last year rather than the lifetime average, and whether the vendor publishes security advisories for its own product.

The short version

  1. Pick a managed host with a firewall, isolation, backups and vulnerability patching built in, and switch on everything they offer.
  2. Unique admin name, long passphrases, 2FA, least privilege, limited login attempts.
  3. Strong database credentials, SFTP only, no file editor, fast updates, no unused code.
  4. Stop spam at the sender level without CAPTCHA, so bots never get a foothold in your forms.
  5. Scan, log and get alerts, so you learn about a problem from a notification, not from Google.
  6. One security plugin, one anti-spam plugin, both kept current.

WordPress security is not a project with an end date. New vulnerabilities appear every week, and most successful attacks exploit something that was already fixed. Keep the layers above in place, review them quarterly, and you will be out of reach of the automated attacks that make up the vast majority of what hits WordPress sites in 2026.

Maria Krasnova Avatar

Maria Krasnova

Marketing Manager

I’m a strategic marketing leader with 10+ years of experience across Europe, MENA, and the CIS. I specialize in building brands, scaling growth through data-driven marketing, and crafting go-to-market strategies that connect innovation with real customer needs.

Areas of Expertise: Digital Marketing