How to Add Cloudflare to WordPress, Install & Setup Easily 2026
By Impran M N
Pairing Cloudflare with WordPress gives you a free CDN, added security, and easy performance tuning through the official plugin, but the setup involves both DNS-level and WordPress-level steps. This guide covers adding your domain to Cloudflare, routing nameservers, and connecting the plugin with an API token so the recommended settings apply cleanly.
01Add your domain to Cloudflare
Enter your WordPress site's root domain into Cloudflare and run the automated DNS scan to import your existing A records.
02Route your nameservers
Copy the custom nameservers Cloudflare generates and update them at your domain registrar so traffic flows through Cloudflare's network.
03Set SSL to Full Strict
Configure Full (Strict) SSL in Cloudflare to avoid the redirect loops that commonly happen when WordPress and Cloudflare disagree on how to handle HTTPS.
04Install the official Cloudflare plugin
In your WordPress admin dashboard, install and activate the official Cloudflare plugin from the plugin directory.
05Generate and connect an API token
Create an API token in Cloudflare and paste it into the plugin's settings to authenticate the connection between WordPress and your Cloudflare account.
06Apply recommended settings
Use the plugin's one-click option to apply Cloudflare's recommended performance and security presets for WordPress.
Frequently asked questions
Why is my WordPress site stuck in a redirect loop after adding Cloudflare?
This usually happens with a mismatched SSL mode — setting Cloudflare to Full (Strict) instead of Flexible typically resolves it.
Do I need the Cloudflare plugin if I already added my domain to Cloudflare?
The plugin isn't strictly required for DNS and proxying to work, but it makes applying WordPress-specific optimizations and clearing cache much easier.
Is the Cloudflare CDN for WordPress free?
Yes, the core CDN, SSL, and plugin integration are all available on Cloudflare's free plan.
What does the API token do in the plugin?
It authenticates the plugin so it can apply Cloudflare settings and purge cache directly from your WordPress dashboard without you logging into Cloudflare separately.
Watch the full walkthrough
The same steps, demonstrated on screen from start to finish.



