How to Use Cloudflare CDN with WordPress
CDN Integration Guide
How to Use Cloudflare CDN with WordPress
Cloudflare CDN can dramatically improve your WordPress website’s speed, security, and reliability—all for free. It reduces load on your server, protects your site from attacks, speeds up delivery, and improves SEO. This guide walks you through setting up Cloudflare with WordPress step-by-step, including best practices for optimization.
1
What Is Cloudflare CDN?
A global content delivery network for speed and security.
Cloudflare is a free CDN and security service that sits between your visitors and your hosting server. It speeds up your website by caching static content and delivering it through 275+ global data centers.
Main benefits:
- Global CDN caching
- DDoS protection
- Bot and spam protection
- SSL/HTTPS management
- Improved Core Web Vitals
- Free DNS hosting (fastest DNS in the world)
2
Step 1: Create a Cloudflare Account
Start by signing up for a free account.
Visit cloudflare.com and create a new account. Cloudflare offers a free plan that is perfect for most WordPress sites.
3
Step 2: Add Your WordPress Website
Cloudflare scans your DNS records automatically.
Enter your domain name (example: sitecrafted.com) and Cloudflare will scan your DNS records.
Important:
Make sure all DNS records required by your hosting provider are enabled (orange cloud).
4
Step 3: Update Your Nameservers
Point your domain to Cloudflare.
Cloudflare will show you two new nameservers. Copy them and update the nameservers at your domain registrar (Namecheap, GoDaddy, Hostinger, etc.).
Propagation usually takes 1–24 hours.
5
Step 4: Enable Cloudflare SSL/HTTPS
Secure your website with free SSL.
Go to:
Cloudflare → SSL/TLS → Full or Full (Strict)
This ensures secure communication between Cloudflare and your server.
Enable these:
- Always Use HTTPS
- Automatic HTTPS Rewrites
6
Step 5: Install the Cloudflare WordPress Plugin
Optional but helpful for purging cache automatically.
Install and activate the official Cloudflare plugin from the WordPress repository.
Benefits of the plugin:
- Auto-purge cache when you update pages
- Set optimal Cloudflare settings
- Enable APO (Automatic Platform Optimization)
7
Step 6: Enable Speed Optimization Features
Use Cloudflare’s optimization settings for faster loading.
Enable these settings:
- Brotli compression
- Auto Minify (CSS, JS, HTML)
- Rocket Loader (optional)
- Early Hints
These settings reduce file sizes and improve speed.
8
Step 7: (Optional) Enable Automatic Platform Optimization (APO)
The biggest speed upgrade for WordPress via Cloudflare.
Cloudflare APO serves your entire WordPress site from the edge network.
Benefits of APO:
- Global caching of full pages
- Faster TTFB (Time To First Byte)
- Better Core Web Vitals
- Huge speed boost for mobile visitors
APO is paid but highly recommended.
9
Step 8: Set Up Cloudflare Page Rules (Important)
Correct page rules prevent conflicts.
Recommended rules:
- *yourdomain.com/wp-admin* — Disable performance features
- *yourdomain.com/wp-login.php* — High Security
- Cache Everything rule (optional)
Page Rules ensure that WordPress admin and login work properly.
10
Step 9: Test Your Website Speed
Confirm that Cloudflare is improving performance.
Use these tools:
- Google PageSpeed Insights
- GTmetrix
- WebPageTest
- Cloudflare Analytics
If you see a high number of cached hits, Cloudflare is working perfectly.
Your Site Can Be 50% Faster with Cloudflare
Every SiteCrafted template is fully optimized for CDN performance, Core Web Vitals, and global caching.
FAQ
Q: Does Cloudflare speed up WordPress?
Yes. Cloudflare reduces server load and improves global speed.
Q: Is Cloudflare free?
Yes. The free plan is enough for most websites.
Q: Do I need the WordPress plugin?
It’s optional but useful for automatic cache purging.
SC
SiteCrafted Team
Helping WordPress users build fast, secure, SEO-friendly websites.









