Malicious web traffic can be filtered at several points before it does any harm to a WordPress site: at a CDN edge, at the origin web server, or inside the PHP application. Each layer sees different information and acts at a different stage of the request.
A request blocked at the CDN edge does not reach the origin server. A request blocked by a PHP-based firewall has already reached the server, and PHP has started.
Filtering at the CDN edge
WP Pro Host uses QUIC.cloud CDN. QUIC.cloud’s CDN security documentation describes several controls, including connection limits and URL flood protection against denial-of-service traffic, WordPress login and XML-RPC brute-force defences, CAPTCHA challenges, and IP and user-agent allow and block lists. It also states that some are always on for free-plan domains while the rest are configurable on the Standard plan, and several of the WordPress-specific options are off by default.
When QUIC.cloud blocks or challenges a request at its edge, that request does not need to reach the origin server. That can reduce malicious traffic reaching the hosting environment and save origin resources.
This is one layer, not a guarantee. What is active depends on the plan and on each domain’s settings, and a CDN only protects traffic that passes through it. A request sent straight to a server’s own IP address does not pass through the CDN unless the origin is configured to accept only CDN traffic. QUIC.cloud’s allowlisting guidance covers how the origin and the CDN’s IP ranges interact.
Filtering at the web server
A web-server firewall can inspect requests at the origin before they are handed to WordPress and PHP application code. Its coverage depends on the server software, the rules available and how it is configured.
At WP Pro Host, cPFence is one of the tools we use. cPFence describes a web application firewall for Apache, Nginx, OpenLiteSpeed and LiteSpeed Enterprise, and a separate network-level layer, IPDB, which uses a shared database of addresses reported for abuse to block traffic by IP. These are different layers: a server firewall filters requests at the origin by what they contain, while IP-based controls block traffic by where it comes from.
What a web-server firewall can see depends on the server engine. cPFence’s WAF documentation says that on Apache, Nginx and OpenLiteSpeed the WAF checks the request URL, query string, headers and cookies but not request bodies, while LiteSpeed Enterprise can also inspect POST bodies. Coverage therefore varies by setup, and you should confirm what applies to your own environment.
A web-server firewall is not a patch for the software behind it. It can only block what its rules recognise, and it cannot change how PHP itself behaves.
A firewall inside PHP
A WordPress security plugin runs as PHP code, so its position in the request matters. Taking Wordfence as a familiar example:
- In its basic protection mode, the firewall loads as a regular WordPress plugin. By then, WordPress has started and some other code may already have run.
- In Extended Protection, Wordfence uses PHP’s
auto_prepend_filesetting to load its firewall before WordPress and other PHP application files. This lets it block requests before vulnerable plugin or theme code runs.
Wordfence explains the modes in its firewall optimization guide and its firewall documentation.
PHP-based firewalls have real strengths. They run inside the application, so they understand WordPress: they can apply rules for specific plugins and themes, see logged-in state and work on hosting where you cannot change server configuration. Extended Protection narrows the gap with a server-level firewall by running earlier.
They also have limits that follow from where they sit. PHP must start before the firewall can run, so a PHP-based firewall cannot be relied on to protect against a flaw in the PHP runtime itself, especially one that can be triggered before the firewall code executes. Every request that reaches the firewall also costs PHP processing time, and Extended Protection needs care when a site moves or its PHP settings change.
None of this makes a PHP-based firewall less useful for what it is designed to do: filtering application-layer attacks aimed at WordPress, plugins and themes.
Other WordPress security layers
cPFence also documents controls that are not firewalls:
- Malware scanning. cPFence describes scanning of changed and added files against regularly updated signatures, with matches quarantined. Scanning helps identify malicious files that are already on the server. It does not stop the request that put them there.
- WordPress core integrity monitoring. This documented check looks for altered, missing or unexpected core files. Its documentation notes that a completed check is not the same as a clean result, and that each finding’s recorded action should be reviewed.
- WP AutoShield. AutoShield applies selected hardening settings and updates, and sends vulnerability reports. Most of its protections run on a schedule rather than continuously, and only the measures that have been enabled are applied.
Each layer has a different job. A CDN edge, an origin firewall, network-level filtering, PHP-based protection and file checks can complement one another, but their effectiveness depends on configuration and coverage. None is a guarantee, and none replaces security updates.
Keep the software patched
Layered filtering can reduce the requests that reach a site, but it does not make unpatched software safe. WordPress, plugins, themes and the PHP runtime all still need timely security updates.
The recent PHP security release is a reminder to confirm that the PHP version serving your site is supported and patched. For a wider look at firewalls, see Web Application Firewalls for WordPress and Server-Level Brute Force Protection.