How to setup SSL certificate via Cloudflare on DigitalOcean | Wordpress platform

Hello guys,

I would like to setup ssl certificate running through cloudflare on my digitialocean droplet. I’m using it on my wordpress CMS.

Is there any step by step guide for this purpose?

Thank you

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Digital Ocean needs to update their network to be compatible with Cloudflare Universal SSL feature.

For time being DO clients should use flexible SSL setting. It means data transfer between DO server and CF is not encrypted anymore, but until DO fixes their network… this workaround will do.

Helloi, @Stepic i made a bash script for easy setup WordPress on digital ocean droplets with Cloudflare FULL SSL support, maybe it’s was very useful and you can fastly deploy and configure your digital ocean droplets.

How To Install WordPress with LEMP on Ubuntu 16.04

This LEMP stack is that fastest way to start running WordPress on your server. Using Nginx, PHP 7.0, MariaDb. Use only on Ubuntu-16.04.


  • Nginx (updated)
  • PHP 7.0
  • PHP-fpm
  • Mariadb (updated)
  • Wordpress (updated)

*Do it on Fresh DigitalOcean Droplet *

Here is the bash script.

wget -qO wp && sudo bash wp

source :-


I installed WordPress on my Ubuntu droplet and activated Cloudflare SSL.

Now when I am trying to go to the site, the site is, as usual, redirecting to https version but is returning error 521. How do I rectify this error?

Thanks, Krishna