← Blog

WordPress Security: A Practical Guide to Hardening Your Site

A practical WordPress security guide: the real attack surface — core, PHP, plugins, themes — and how to harden, monitor, and patch, including the 2026 critical PHP RCE flaws.

Bruno Baldo·Oct 23, 2026·4 min read·Reviewed by Rainforest Technologies

WordPress runs a large portion of the world's websites, from personal blogs to enterprise marketing sites and e-commerce storefronts. That ubiquity is exactly why it draws so much hostile attention: attackers automate against WordPress at internet scale, scanning for known-vulnerable plugins, exposed logins and outdated runtimes. The good news is that the overwhelming majority of those attacks target known, patchable weaknesses — which means a disciplined security program closes most of the risk.

This guide walks through the real WordPress attack surface and a practical approach to hardening it.

The WordPress attack surface, layer by layer

It helps to think of a WordPress site as a stack, because a weakness in any layer can compromise the whole site.

The runtime: PHP

Everything WordPress does runs on PHP. A vulnerability in the PHP interpreter affects every site on that server, regardless of how well the application itself is written. The two critical flaws disclosed in October 2026 — CVE-2026-109618 and CVE-2026-109619, both CVSS 9.8 — are a sharp example: they allow unauthenticated remote code execution in the PHP core, so a fully updated WordPress install on a vulnerable PHP version is still exposed. If you run WordPress, read our breakdown of these PHP RCE vulnerabilities and confirm your PHP version is patched.

The takeaway: patching WordPress is not enough — you have to patch the runtime beneath it too.

WordPress core

The core software is actively maintained and ships security releases promptly. Keeping core on the latest version — ideally with automatic minor updates enabled — closes this layer for most sites. Core vulnerabilities are comparatively rare; the bigger risk is running an old major version that no longer receives fixes.

Plugins and themes

This is where most WordPress compromises actually happen. The plugin and theme ecosystem is vast and uneven in quality: a single abandoned plugin with a known vulnerability is enough to take over a site. The risks cluster around:

  • Outdated plugins/themes with published, exploitable vulnerabilities.
  • Abandoned code that no longer receives security updates.
  • Nulled (pirated) themes and plugins, which frequently ship with hidden backdoors.
  • Excessive plugin sprawl — every added plugin widens the attack surface.

Access and configuration

Finally, the way the site is administered: weak or reused admin passwords, no multi-factor authentication, over-privileged user accounts, exposed wp-admin and xmlrpc.php endpoints, and misconfigured file permissions.

A practical hardening checklist

  1. Patch everything, fast — including PHP. Enable automatic updates for WordPress core and, where you trust them, for plugins and themes. Track and update your PHP version with the same urgency; as CVE-2026-109618 and CVE-2026-109619 show, the runtime is part of your attack surface.
  2. Minimize plugins and themes. Remove anything you do not actively use. Deactivated is not enough — delete it. Never run nulled plugins or themes.
  3. Enforce strong authentication. Require strong, unique passwords for every account and turn on multi-factor authentication for all administrators. Limit login attempts to blunt brute-force and credential-stuffing attacks.
  4. Apply least privilege. Give each user the lowest role that lets them do their job. Audit administrator accounts regularly and remove the ones you no longer need.
  5. Harden the surface. Restrict access to wp-admin, disable xmlrpc.php if you do not use it, set correct file permissions, and disable file editing from the dashboard (DISALLOW_FILE_EDIT).
  6. Use HTTPS everywhere and keep backups. Enforce TLS, and maintain tested, off-site backups so you can recover quickly if prevention fails.
  7. Monitor continuously. Watch for unexpected file changes, new admin users, and outbound connections. Early detection is the difference between a blocked attempt and a full compromise.

Security is continuous, not a checkbox

The single most common thread in WordPress breaches is time-to-patch. A vulnerability is disclosed, exploit code circulates within days, and automated scanners find every unpatched site. Hardening your configuration once is valuable, but it does not help with the vulnerability published next week. What actually protects a WordPress estate over time is a repeatable loop: know what you run, patch it quickly, keep privileges tight, and watch for trouble.

That is hard to do by hand once you manage more than a handful of sites — which is where continuous security tooling earns its place.

How Rainforest helps

Rainforest's platform gives you continuous visibility into the components your sites actually run — including the PHP runtime version beneath WordPress — and correlates them against current vulnerability intelligence. When a critical flaw like CVE-2026-109618 lands, you can immediately see which sites are exposed and act on the ones that matter first, instead of auditing servers one by one. If you develop custom PHP alongside WordPress, pair this with our guide on developing safer applications with PHP, or book a demo to see how Rainforest keeps your web estate covered.

Frequently asked questions

Is WordPress secure?

WordPress core is actively maintained and reasonably secure out of the box. The real risk comes from the layers around it — outdated plugins and themes, weak access control, and the PHP runtime underneath — so a site's security depends far more on how it is maintained than on WordPress itself.

What is the most common way WordPress sites get hacked?

Outdated plugins and themes with known, published vulnerabilities, followed by weak or reused administrator credentials. The large majority of attacks are automated and target flaws that already have a patch available.

Do PHP vulnerabilities affect WordPress?

Yes. WordPress runs on PHP, so a vulnerability in the PHP interpreter — such as the critical 2026 flaws CVE-2026-109618 and CVE-2026-109619 — affects WordPress regardless of plugins or themes. The fix is to upgrade PHP on the server, not WordPress alone.

How often should I update WordPress and its plugins?

As soon as updates are available. Enable automatic updates for core and trusted plugins, and treat PHP updates with the same priority. Time-to-patch is the single biggest factor in whether a site gets compromised.

Should I use a security plugin?

A reputable security plugin helps with hardening and monitoring, but it is not a substitute for patching and least privilege. Treat it as one layer in a continuous program, not a one-click fix.

Bruno Baldo

Written by

Bruno Baldo

CMO

Um pouco de marketing e um pouco de curiosidade e temos a receita pra criar um apaixonado por cyber!

Keep reading