2.14.3.8. Configure HTTPS in OpenCart

  1. Check if an SSL certificate is installed in SSL settings. If the certificate is not installed, install it.
    1. In the config.php file located in the site root directory, find the line with the HTTPS_SERVER parameter:
      // HTTPS
      define('HTTPS_SERVER', 'http://example.com/');

      In the address specified in it, replace HTTP with HTTPS so that it looks as follows:

      // HTTPS
      define('HTTPS_SERVER', 'https://example.com/');
    2. In the config.php file in the admin directory, find lines with HTTPS_SERVER and HTTPS_CATALOG parameters:
      // HTTPS
      define('HTTPS_SERVER', 'http://example.com/admin/');
      define('HTTPS_CATALOG', 'http://example.com/');

      Replace HTTP with HTTPS in the addresses specified in them so that they look as follows:

      // HTTPS
      define('HTTPS_SERVER', 'https://example.com/admin/');
      define('HTTPS_CATALOG', 'https://example.com/');
  2. Enable SSL support in the admin panel of the site itself:
    1. Open the site admin panel.
    2. Go to "System → Settings".
    3. To the right of the store name, click "Edit".
    4. Switch to the "Server" tab.
    5. Next to "Use SSL", select "Yes".
    6. Save changes by clicking "Save" in the upper-right corner of the page.
  3. Enable redirect to HTTPS.
  4. Check the site operation.

In most cases, the actions described above are sufficient to enable HTTPS on your site.

If you use OpenCart 2.2 and the described actions are not sufficient, see additional HTTPS configuration in OpenCart 2.2.
Content