DreamHost recently announced free SSL certificates through their domain hosting using Let’s Encrypt. Until today, my site was not on a secure connection (SSL). Even though I had intended to get my site on a secure connection, I just never got around to it until now.
What Is Let’s Encrypt?
Let’s Encrypt is free open source software that will allow you to generate and renew SSL certificates with ease. With Let’s Encrypt, you no longer have expired warnings, certificate configurations, and no more payments! Let’s Encrypt has been in Beta for some time now and people have been using the library to generate certificates for their site without problems. I cannot go into the low level details of Let’s Encrypt as they are over my head.
The Big News From DreamHost
Since I host all my sites on DreamHost (affiliate linkage), I was ecstatic to hear they enabled Let’s Encrypt for their shared hosting. Technically you could generate a free SSL key on shared hosting before, but I held off until DreamHost automated the process. If you host your domain on DreamHost and want a secure connection, I recommend enabling the free SSL certificate.
Using SSL With WordPress
If you want to switch from http to https on your WordPress site, there is not exactly an “Easy Button”. There are many different ways this can be done, but here is how I did it.
First. Back up your database and Enable SSL in DreamHost. I waited an hour for everything to “fall in place”. Once I knew https was working for my domain, I went into my wp-config.php file and forced SSL within the wp-admin. After saving the changes, I logged into my admin to make sure it was working correctly.
Since WordPress saves a lot of urls within the database, I needed to correct them for https. With the WP-CLI search-replace functionality, I can replace those the old http urls with the new https urls.
Finally. It is time to force https within the .htaccess file. This snippet will simply redirect (301) the user to the https version of the url. Old non-https links will just be redirected to the https version.
If you need more information on using SSL with WordPress, here are a few good guides.