Adding an SSL Certificate to the One-Click WordPress Image

  • Posted December 1, 2014


I’ve recently setup a WordPress using the One-Click image that DigitalOcean offers. I already have my domain pointed to it but I’m having an issue in finding the right information on how to add an SSL certificate to it.

Both my domain and SSL Certificate are from Namecheap as I got them in the GitHub Student Pack. Note that on the Namecheap Control Panel the SSL Certificate is PositiveSSL.

How would I go about creating and then adding my SSL Certificate?


any ideas?

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

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.

For those having the same issue, a lot of the docs in here have outdated info about updating certbot after you’ve already set up the droplet. You can set up certbot as part of the droplet creation process, but if you elect out of it, it can be really hard to find information about how to add it after the fact.

However, the detailed instructions (just a few commands) can be found here:

If you’re running into Cloudflare SSL handshake failures, it’s probably because your droplet doesn’t have an SSL certificate, and following those steps solved the issue for me.

The CSR part is useful.

It is easiest way . I just made it at one click installer. Tutorial link that I found.

I am facing issue installing COMODO certificate for my Wordpress website. Anyone with the step by step guide for this? What is the best way to transfer two files to the server (crt and bundle)? Thanks

Hello! Anyone have any solutions to this? I’m stuck with this problem too.

OK, I’m stuck…I followed the tutorials here and I can restart Apache and it’s loading the default-ssl.conf page.

I changed my site address in config.php like this:

define(‘WP_HOME’, ‘’); define(‘WP_SITEURL’, ‘’);

Now if I go to, I just get redirected to

Firefox indicates that the site is NOT secure.

If I had this to .htaccess:

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$$1 [R,L] </IfModule>

And I go to, Firefox indicates the site IS protected (I can see the little green lock) BUT the site won’t load - it gives me a message about how the site was redirected too many times and advises me to clear my cookies (that didn’t work).

I’m at the five-yard line - any advice on how to finish this?

I know that this is a few months old, but I thought I’d chime in.

In the WP Dashboard, go to general, and update your site’s domain names to reflect https instead of http.

Next, go install wp-force-https and every site will use https instead of http. This will also kick users who may type http in the address bar over to https.

The key file was generated in /etc/apache2/ssl when you generated your csr. You can include the ca-bundle by adding the following line to your configuration:

SSLCertificateChainFile /etc/apache2/ssl/

The Wordpress image is a fairly stock apache configuration. To set up SSL you will first need to create a directory to keep your certificate and key and generate the csr that your certificate authority will use to generate your new certificate.

sudo mkdir /etc/apache2/ssl

openssl req -new -newkey rsa:2048 -nodes -keyout /etc/apache2/ssl/server.key -out /etc/apache2/ssl/server.csr

You will be asked several questions, your answers to which will be used to generate your new certificate. Make sure that the common name you provide is the FQDN that your site will be using.

You will need to provide the “server.csr” file to your certificate authority and when you receive your certificate you can copy it into a new file called: /etc/apache2/ssl/apache.crt

Once this is done you will just need to configure apache to use your new certificate. You can find details on this in steps 3-5 of this tutorial.