X
    Categories: Drupal Tutorials, Tips and Guides

How to Install Let’s Encrypt Free SSL on Drupal

In my previous article, I have taught you how to add Let’s Encrypt Certificate to your PHP sites. In this article, I will teach you how to install Let’s Encrypt SSl certificate on Drupal sites and force them to use HTTPs only. All the requirements for Let’s Encrypt are the same as I have discussed in my previous article.

Now let’s start.

How to Install Let’s Encrypt SSL Certificate on Drupal

First, login to your Cloudways account and head to the application in which you want to install Let’s Encrypt. Once in your Drupal application management menu, click on SSL Certificate from the left side menu.

Now in the Let’s Encrypt fill with your email and domain for which you are going to add SSL and click on Install Certificate. You also have to option to add the SSL certificate for multiple domains.

Wait for Cloudways to install Let’s Encrypt SSL on your site.

Once it’s installed, select YES from the Auto Renewal drop down and then click on Save Changes to let Cloudways renew your certificate automatically.

Now point to your domain like https://www.example.com. You will see that your CSS is not loading properly. In order to load it properly, go the Master Credentials tab on your server and Launch the SSH terminal.

Sign in with your credentials and type the following command to reach the Drupal settings.php folder.

cd applications/<your application name>/public_html/sites/default

Now type the following command to edit settings.php

vi settings.php

Now press down key till you find this line

$base_url = 'http://yoursiteurl';

Now press Insert key and comment that line.

Now press ESC and :wq to save and exit the editor. Now again open your site using https and you will see that your theme is fully loaded now.

Ease and Convenience

You have successfully configured your Drupal site for SSL use.

I hope you found this article helpful. If you’ve got any questions, leave them in the comments section below.

Cloudways Managed Drupal Hosting Platform is built to make life easy for developers and agencies. Server and application management are easy and security is a prime feature of the Cloudways Platform. Sign up for your free trial today.

Ahmed Khan: Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at ahmed.khan@cloudways.com