Fixing WordPress Admin Issues with CloudFlare Page Rules 17

I’ve been noticing some wonkiness with the admin area of our WordPress blog at EXTRA!. Through some experimentation, I noticed that all of the issues went away if I put CloudFlare into Development Mode. This, however, isn’t a long-term fix, so I decided to create a CloudFlare Page Rule for the /wp-admin/ directory. To do this, just login to CloudFlare and create a Page Rule that covers:*

Then turn off EVERYTHING: apps, cache, security, always on, etc.

This fixed most of my problem, but I noticed that I still had issues when logging in or out of the WordPress admin area, and I couldn’t figure out why.

Then it hit me – the login page for the WordPress admin area isn’t in the WordPress admin area, and therefore wasn’t covered by my CloudFlare Page Rule! Instead, the WordPress login page is here:

So I added a second page rule that covered:*

The asterisk is necessary to cover URLs such as:

Now the login/logout hangs and other strange behavior are gone, my WordPress admin area works great for all our authors, and I’m still benefitting from CloudFlare protection and optimization across the rest of the blog.

So if you’re noticing strangeness between WordPress and CloudFlare, create a Page Rule!

  • Thanks mate, was facing this issue recently.. hope this will solve the problem 🙂

  • Thank you for saving me some time 🙂 Your a ROCK Star

    ‘*– no cache — no options’

    This seems to works on my Multi Site install

    Just thought i would let you know

  • Damien Power

    Thank you, sir! This was shaping up to be a real nightmare, and your two lines of rules made my day!

    • Great to hear. I wish CloudFlare would put this in their knowledgebase!

  • Al


    If I all understand (sorry for my english)
    With 3 rules

    1* -> no cache
    2* -> no cache
    3* -> agressive cache

    My website is working well without admin access problems ?

    • Salut, Albert, Oui, vous avez bien compris le blog post. Ces trois règles en CloudFlare devraient résoudre votre problème.

      • Al

        Thanks/Merci 😀
        for your quick answer !
        and your good french 😉

        • C’est rien (et j’ai vécu en France pendant quelques ans) 🙂

  • Thanks Steve, Have been shut out from my site on a few occasions by cloudflare – love that I don’t need to think about putting cloudflare into development mode anymore (I always forget).

    …Now if you happen to have any idea why why the caching on my site (cloudflare / wp super cache) seems to periodically serve up the mobile theme on my desktop home page or conversely the desktop theme on a mobile device, you’d have a fan for life.

    In either case, grateful for finding this post whilst searching for other answers.

  • John

    Thanks so much,

    This solved an issue for me as well, having to do with a setting in the Clean Login plugin…

  • Thanks for this post, Steve.

    One question for clarity. You say to turn off everything, including security. I understand the others but would be concerned about turning off security. Doesn’t that leave ‘Admin’ open?

  • Have you tried to run the rules with security on? I’m thinking that if there’s any place I’d like Cloudflare security, then it’s in the login/admin pages…

  • Thank you very much, had this issue when I disabled object and database cache under W3 total cache, since I’m on a shared host.

  • Ryan

    Thanks for the great write-up. You can also find some helpful tutorials on our new Page Rules page at:

    Page Rules are currently limited by Plan Type, but that will be changing soon. You’ll be able to purchase additional Page Rules without changing your plan type.

  • What about saving page rules and cache /*