发布前,若步骤依赖主机商,我们会在至少两家平台各走一遍;否则在同一环境隔日执行两次。我们记录控制台报错、不同地区的界面文案差异,并在厂商调整按钮位置后立即更新文案。路径与截图每季度抽检。涉及 DNS、SSL 或付款时,我们确认回滚/补救选项,并链接到官方文档以获取权威表述。
Go to cloudflare.com and click "Sign Up". Enter your email and create a password. Click "Add a Site" on the dashboard, enter your domain name (without www or https), and select the Free plan. Cloudflare will scan your existing DNS records. review them to confirm they look correct.
Cloudflare acts as a DNS proxy. all traffic routes through Cloudflare before reaching your server. To enable this, update your domain's nameservers at your domain registrar to the two Cloudflare nameservers it provides (e.g., ada.ns.cloudflare.com and liam.ns.cloudflare.com). Find this in your registrar's DNS/Nameserver settings. DNS propagation typically completes within 1–24 hours.
Once your domain is active on Cloudflare, go to Caching → Configuration. Set "Caching Level" to Standard. Set "Browser Cache TTL" to 4 hours (or longer for static assets you change infrequently). Enable "Always Use HTTPS" under SSL/TLS → Edge Certificates to ensure all traffic is encrypted. Cloudflare caches static assets automatically; dynamic pages (WordPress admin, checkout) are not cached by default.
In your WordPress dashboard, go to Plugins → Add New and search for "Cloudflare". Install and activate the official Cloudflare plugin. Connect it to your Cloudflare account using your email and a Cloudflare API Token (create one in your Cloudflare dashboard under Profile → API Tokens → Create Token → Edit Zone DNS). The plugin allows cache purging directly from WordPress.
In your Cloudflare dashboard → Speed: Enable Auto Minify for HTML, CSS, and JavaScript. Enable Rocket Loader (speeds up JavaScript delivery. test your site afterwards to confirm it doesn't break any interactive elements). Enable Early Hints if available on your plan. Under Images (if on a paid plan), enable Mirage for mobile image optimisation.
Cloudflare's free plan includes basic DDoS protection and a Web Application Firewall. In Security → WAF: enable the Cloudflare Managed Ruleset for WordPress (blocks known WordPress exploits). In Security → Bots: enable Bot Fight Mode to block automated scraping and brute force attacks. These settings add meaningful security with zero performance impact.
Go to GTmetrix or WebPageTest and test your site from multiple geographic locations. Look for: CDN-served assets (shown in the waterfall as coming from a Cloudflare domain or CDN hostname), improved load times from distant locations (US site should now load faster in Europe/Asia), and green HTTPS padlock in browsers. Also check that your WordPress admin panel (/wp-admin/) still works correctly.