To get most of your Cloudflare account, you need to configure it carefully for WordPress. WordPress caching plugins are great, but nothing beats an edge cache when it comes to site speed.

If you don’t have a Cloudflare account, create your free account here.

Here are the recommended Cloudflare settings for WordPress.

1. Add Your Site to Cloudflare

Enter your site domain and click “Add site”

Select “Free” plan if you require basic protection

2. Speed Settings for WordPress

From sidebar menu go to Caching – Configuration

Set Caching Level to “:Ignore query string”, Browser Cache TTL to “Respect Existing Headers”

“Respect Existing Headers” setting is only recommended if you have a WordPress caching plugin installed on your site. Using this setting, we leave browser caching management to our caching plugin.

3. Page Rules for WordPress

Go to Rules – Page Rules using sidebar menu

Free plan allows 3 page rules to be defined

Since WordPress is a dynamic application, we need to make sure dynamic pages are not cached. But all static pages and posts should be cached at maximum levels.

Here are the recommended rules for the general audience:

Rule1. Do not cache preview links

URL: *.example.com/*preview=true*

Cache Level: Bypass

Rule2. Do not cache wp-admin

URL: *.example.com/wp-admin/*

Cache Level: Bypass

Rule3. Cache everything else

URL: *.example.com/*

Cache Level: Cache Everything

Edge Cache TTL: a month (this can be purged, keep it long)

Browser Cache TTL: 24 days (pick according to your content update frequency, but keep it as high as possible)

 

Conclusion

Cloudflare is one of the best CDN alternatives to use with WordPress websites. Its free plan enables edge caching on your site while also protecting it from hackers and bot attacks.

When you use edge caching and cache warming wisely, your site will start climbing up on search engines, and it will also make your users happy.