How to enable SSL in OpenCart

How to enable SSL in OpenCart

SSL stands for Secure Sockets Layer and is a standard security technology used to encrypt the connection between the browser and the hostingserver on which your website is hosted. A website having an SSL certificate is most commonly recognized by the https URL and the secured padlock in the client browser.

  1. The first step is to purchase and install a SSL certificate on the hosting account.
  2. Before you enable the SSL support in your OpenCart admin dashboard, you will need to edit the two configuration files of your OpenCart store. Both files are called config.php and they are located under the root directory of your OpenCart application and under the admin folder. You can edit your files either via your cPanel File Manager or by downloading them on your local computer via FTP and reupload them after the changes.
  3. After you found the files you need to locate the following section in both of your files:
    // HTTPS
    define('HTTPS_SERVER', 'http://yourdomain.com/');

    Modify the line to include https instead of http:

    // HTTPS
    define('HTTPS_SERVER', 'https://yourdomain.com/');

    When you have the correct https URL set for your OpenCart application, save the files and upload them back to your OpenCart installation if you are performing the changes locally on your computer. Remember to modify both the main config.php file and the admin folder config.php.

  4. Now you need to activate the SSL support via the OpenCart admin dashboard. You can do this by logging into your OpenCart 2 admin panel and navigating to the System->Settings menu. After that click Edit on your store and click the Server tab:

     

    The first settings under the Server tab should be the Use SSL option. Click on the Yes radio button and save your settings via the save icon at the top right corner of your screen:

     

  5. Now your checkout, registration and other pages on which sensitive information is submitted will be accessible only via HTTPS.

Thank you for checking our tutorial. Now you know how to enable SSL in OpenCart 2.x.

Was this article helpful?

Related Articles

Leave A Comment?