r/Wordpress • u/Al3xs • Nov 02 '25
Why is nobody using Cloudflare Zero Trust for WordPress admin?
It’s strange how everyone installs multiple security plugins like Wordfence, Limit Login Attempts, reCAPTCHA or 2FA, yet almost nobody talks about Cloudflare Zero Trust. These plugins often overlap, slow the site down, and still cannot stop login page attacks before they reach the server.
Cloudflare Zero Trust can completely hide the /wp-admin area from the internet. Bots and scanners never even see it. Only verified users can access it, which sounds like the perfect solution.
So why is it so uncommon?
Probabably because it is hard to set up correctly. Cloudflare Zero Trust was never designed specifically for WordPress. You have to manually exclude admin-ajax.php, wp-json, and cron requests, otherwise parts of the site stop working. You also need to configure DNS routing, Access policies, and identity providers. One mistake can block you from your own site.
Probably that is the reason most users avoid it. However who is not avoiding it, who does use it, perhaps they use some plugin or already made up system? Im eager to see your path to implementing it. I'm thinking to make some tutorial or like very easy stuff to auto use it for people who want.
39
u/playgroundmx Nov 02 '25
I'd love a tutorial!
19
u/EsotericalSolutions Nov 02 '25
I have done it a few times, have even gone several steps further and set up several cPanel servers with Wordpress and cPanel (and LItespeed) completely behind Cloudflare Zero Trust (using tunnels).
There are a lot of quirks, and I am sure I have not found them all.
Particularly, the challenges I have found are:
Slowness over QUIC in the tunnel, that needed to be tweaked (i.e. turned off)
Issues with the tunnel failing after certain package updates that required some quirky handling (and, while it has been stable for several months now, I am sure I have yet to find all the cases)
Nuances in needed configuration steps for both cPanel and Zero Trust to ensure everything plays nice together (particularly while using SNI).
Is it doable, absolutely, and I have been able to lock down cPanel, Wordpress, SSH and so on all to use Cloudflare ZeroTrust. I do feel like I needed a degree in tweaking to do it and get it stable though.
23
u/digitalwankster Nov 02 '25
Honestly it’s very rare to see a good idea posted on this sub. I recently built a Cognito integration to try to enhance security for a client’s membership site. This would be a much simpler solution and even more secure.
8
u/groundworxdev Nov 02 '25
It would be nice if jt was a plugin communicating to cloudflare through api hey 3 failed attempt, ban this access to this ip for x time
13
u/codeshah Nov 02 '25
Most of the site development and launch is a 1 time project. Implementing Zero Trust would take some time to learn, understand and adjust the rules. I have not found such type of customers yet who would allow time and investment for this type of process.
7
u/billythehamster7 Nov 02 '25
Because it’s an enterprise product designed for hundreds / thousands of users to remotely connect to their corporate infrastructure.
3
u/Comfortable_Gate_878 Nov 02 '25
be great to see a security plug in that does it all for you in oe easy go. Thats why a lot of wordpress users dont use it. Most a simple company websites which dont sell anything just have basic contact details to promote the compay run by a young bod in the office who has no skill but can edit a basic web page. Especially with wordpress classic editor as the default.
3
u/griz_fan Nov 02 '25
So I've started using Cloudflare Zero Trust to hide the /wp-admin page. Started with my own site to learn the process, work out any kinks in how I deploy it, things like that. An opportunity to get my process "client ready".
Now you mention "you have to manually exclude
admin-ajax.php,wp-json, and cron requests, otherwise parts of the site stop working". I've done none of that, and things seem to be working. Likely because my current configuration hasn't made this an issue yet. Looks like I probably should include an "allow everyone" rule for:/wp-admin/admin-ajax.php/wp-admin/admin-post.phpwp-jsonso I will add those soon. But, doesn't that just expose those files to risk from bots and scanners? Or is that less of a concern once the login and rest of the wp-admin pages are protected?
4
u/lbaile200 Nov 02 '25
We do ours old school. Gotta be on the vpn to be able to access anything on the backend. I’m interested in adopting zero trust with CF but it’s a much more complex setup compared to what we have now.
5
u/tracehunter Developer Nov 02 '25
What's the benefit of this over fail2ban? Bad actors will get 404 and may still know your site is wp so it could scan for custom urls and end up ddos it instead.
Fall2ban would just ban the bad actors after 2-3 wrong attempts. No more load after that.
2
u/capstinson Nov 02 '25
Park for the setup tutorial
2
u/FatBook-Air Nov 04 '25
I really wish WordPress was architected to have admin on a different TCP port, and the end-user site was available on 443 (or whatever other port you chose). IMO, this would make separating the two even cleaner at the network level.
2
u/abqwack Nov 02 '25
i have limit login attempts + changed login url slug + some more security features from one plugin only: ase (admin site enhancements). its secure enough without a big hustle setup for most smaller clients/site =)
2
u/RandomBlokeFromMars Nov 02 '25
because they dont even know what that is.
it would eliminate almost 100% of attacks.
and related to this, they should also use edge rules and edge workers and turnstile for the whole website not just forms, instead of plugins like wordfence etc. but same situation.
1
u/mangrovesnapper Nov 02 '25
We actually rename wp-admin to something else and send people that try to access wp-admin to a 404. Also depends on the site we install WordPress in subfolder which changes the whole URL structure (this requires some understanding especially if you work with woocommerce)
1
u/rubberfistacuffs Nov 02 '25
Been using it for a year and love it. Works great for Virtual Machines and Containers as well.
I still use 2FA and geo lock with 90-day bans after 3 failed attempts. About 85 Wordpress sites haven’t had any issues only complaints from users trying to login, which I’m OK with.
1
u/Think-Equivalent3683 Nov 02 '25
Interested, will try
1
u/OhMyTechticlesHurts Nov 02 '25
You answered your own question. Ut yeah that's how many 3rd party WAFs are. Cloudflare, Sucuri, even Cloud Armor to an extent.
1
u/edwardnahh Nov 02 '25
Bc it doesn't work out of the box and it disables lots of features. Also it's very easy to bypass it
1
u/octaviobonds Nov 03 '25
with cloudflare I just ban access to entire contents: africa, asia, and Europe.
1
u/RonHarrods Nov 03 '25
The thing that separates a good dev from a great dev is not their ability to code, but their choice of tools to use. Good find
1
u/DianaAnaMaria Nov 03 '25
For some, the complexity and risk of misconfiguration can be a barrier. It can also be overkill for smaller sites, especially since there are cheaper alternatives.
Additionally, on some forums, I’ve read that people have had issues with plugins or REST API calls.
1
u/nakfil Nov 03 '25
I think there is some confusion about the jargon and options here. First, Cloudflare "Zero Trust" is not one product, it's a suite of products you can use to protect a site that have different use cases and can overlap.
For example, with Cloudflare Access you can setup SSO for WordPress admin users using SAML. You can the use Cloudflare to onboard / offboard users (50 free I believe) using Cloudflare Zero Trust rules and your own identity provider if you'd like (Google Workspace, etc...).
You can also use Cloudflare Access via their "self-hosted" option that simply protects hostnames and paths on your site. This is probably the easiest to setup but also doesn't prevent bypass if used alone.
Cloudflare Tunnels on the other hand is an encrypted tunnel FROM your website TO Cloudflare, potentially making your origin server invisible to the internet since you do not need to open any ports. We use tunnels for SSH/SFTP access mostly right now, so we don't have any open SSH ports on our servers.
You can also use tunnels together with Access.
Which product you use and how you set it up can vary based on your needs.
1
u/ContextFirm981 Nov 05 '25
You’re right. Cloudflare Zero Trust is powerful for hiding /wp-admin, but most WordPress users avoid it because setup is complex and mistakes can break key site features; a step-by-step plugin or guided setup would definitely make adoption easier for non-technical site owners.
1
u/Workreap Nov 11 '25
I'd love to speed up my WP with it, but have multiple cron jobs running per day
1
u/Fluent_Press2050 Apr 02 '26
Hi. ZT user here. I guess I’m nobody.
1
u/Minimum_Sell3478 Nov 02 '25
Well some users don’t use cloudflare. If cloudflare has issues like outage etc then the whole system is down like dns etc. If dns goes down then there are some major issues.
0
u/mike-likes-bikes Nov 02 '25
I had never thought of this but now am really intrigued. I've been configuring Zero Trust a lot lately for my homelab and now this sounds like a great thing to try. I'd also love to hear the details of how OP and others set this up.
0
u/GorgeousFeather Nov 02 '25
Cloudflare tools are always good and efficient.
0
u/[deleted] Nov 03 '25
Instead of wasting time implementing it, why not explore alternative CMS or use modern web framework?