Best Cloudflare Page Rules for WordPress

Last updated:

Here are the best Cloudflare Page Rules for WordPress. 3 Page Rules can be created to set up a proper cache for your WordPress site.

What are Page Rules?

In Cloudflare, Page Rules allow you to control the Cloudflare settings that trigger on a specific URL. With Page Rules, only one page rule will be triggered at a single URL.

By using asterisks (*), you can create dynamic patterns that match not just one, but many URLs.

You can learn how to set up Cloudflare for WordPress in the following article.

Page Rules Restrictions

You can create up to 3 Page Rules for free. You can also purchase additional Page Rules.

You can add from 5 to 95. Prices range from $5-$95/month.

Create a Page Rules in Cloudflare

Select the domain for which you want to set the page rule.

  1. Select a Rules
  2. Click on the Create Page Rules
Page Rules

This will open the Page Rules creation screen.

Page Rules

Best Cloudflare Page Rules for WordPress

The three best Cloudflare Page Rules for WordPress are as follows Do not cache the admin panel or preview.

Don’t cache the admin panel

Create the following page rule to avoid caching the WordPress admin page.

  1. Input example.com/wp-admin/*
  2. Select the Cache Level
  3. Select Disable Performance
  4. Select Bypass
  5. Click Save and Deploy

Please use the domain you are using for example.com.

Don't cache the admin panel

Don’t cache previews

Create the following page rule to avoid caching the preview.

  1. Input example.com/*&preview=true*
  2. Select the Cache Level
  3. Select Bypass
  4. Select Disable Apps
  5. Click Save and Deploy

Please use the domain you are using for example.com.

Don't cache previews

Cache all pages of the domain

If you want to cache all pages of a domain, create the following page rule.

  1. Input example.com/*
  2. Select the Cache Level
  3. Select the Edge Cache TTL
  4. Select Cache Everything
  5. Select 2 hours
  6. Click Save and Deploy

Please use the domain you are using for example.com.

Cache all pages of the domain

When you have finished creating the Page Rules, put them in the following order.

Page Rules

This completes the configuration of the best Page Rules for WordPress.

go to top