Support Home > Getting Started > Use Jetpack and Cloudflare on your WordPress site

Use Jetpack and Cloudflare on your WordPress site

Here are a few steps to follow to configure Cloudflare on your site, before installing the Jetpack plugin.

Cloudflare is a popular CDN, caching, and protection service. It can be used with WordPress, and is compatible with Jetpack.

Jetpack communicates with your website through the secure use of your xmlrpc.php file. By default, Cloudflare blocks all non-Jetpack access to this file and serves an “HTTP 403 Forbidden” message. This is designed to block access to that file by unwarranted users.

Cloudflare has settings in place to make sure that Jetpack requests to the xmlrpc.php file are allowed to pass through their firewalls and protection services. This means you should not have to manually configure access for Jetpack through Cloudflare. The steps below help to ensure that your site is optimized to work well with Cloudflare.

To get started, you’ll want to follow the instructions to add your site to Cloudflare.

Create a PageRule to exclude WordPress’ dashboard from Cloudflare.

While Cloudflare is useful for your readers, you do not need to use it for your site’s dashboard. It may in fact cause some issues. Luckily, you can set up rules so Cloudflare ignores your site’s dashboard.

  1. Go to “Page Rules” in your Cloudflare dashboard.
  2. Under “Add New Rule”, enter the following: *yoursite.com/wp-admin*
  3. Make sure caching, apps, and performance are disabled.
  4. Save your changes.

CloudFlare Page Rule

Use Cloudflare’s SSL certificate on your site.

  1. Under the Crypto menu, enable one of Cloudflare’s SSL options.CloudFlare's SSL options
  2. Wait for the changes to be available on your site.
  3. Install and activate the Cloudflare plugin.
  4. Install the Cloudflare Flexible SSL plugin to avoid running into Redirect loop issues in your dashboard.
  5. Enable Administration over SSL (reference) by adding the following to wp-config.php:
    /**
     * Admin over SSL
     */
    define('FORCE_SSL_ADMIN', true);
    
  6. Set the port to 443 by adding the following to wp-config.php:
    /**
     * Set port to 443
     */
    $_SERVER['SERVER_PORT'] = 443;
    
  7. Under Settings > General in your dashboard, change both your site address and WordPress address to use HTTPS.
  8. In your Cloudflare settings, create a Page Rule to redirect all traffic from HTTP to HTTPS.

You should then be all set, now install the Jetpack plugin!

  • Table Of Contents

  • Categories

  • Contact Us

    Need more help? Feel free to contact us.