Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
Last active March 20, 2018 02:54
Show Gist options
  • Save geoffyuen/8ba8e7a2bfc1e86b2392 to your computer and use it in GitHub Desktop.
Save geoffyuen/8ba8e7a2bfc1e86b2392 to your computer and use it in GitHub Desktop.
Use https for free with Cloudflare on your Serverpilot VPS

Use Free Cloudflare SSL with Wordpress

  1. Add your domain in your Cloudflare account
  2. Install Wordpress
  3. Save your permalinks
  4. Install Cloudflare Plugin (not sure if this is needed)
  5. Install CloudFlare Flexible SSL (fixes SSL Redirect Loop)
  6. Edit wp-config to use https for your home and site url - it's better to this here instead of through the wp-admin in-case something goes wrong
  7. Add these lines to the top of your .htaccess:

RewriteCond %{HTTP:X-Forwarded-Proto} !=https

RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=302,L]

@ALEX1587
Copy link

Hello, I tried this and It didn't work. Do you have a more detailed Tutorial?

@GuruWithin
Copy link

Have you tried this on Serverpilot connected vps ? Because I doubt there is some more caveat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment