CityHost.UA
Help and support

How to connect an SSL certificate in OpenCart

If necessary, activate an SSL certificate (HTTPS mode of operation) for a site running OpenCart CMS, it is important to do it correctly, because simply issuing an SSL certificate on the hosting and enabling HTTPS redirection can "break" the display of the site, and you will see something like this:

There are several options for activating the SSL mode on the site: automatic through the site admin , and manual through editing the config.php files , consider both, and you choose the one that will work for your case.

???? Automatic mode

???? Manual mode

Activation of SSL mode through the site admin

Go to the site admin ? select System in the menu block ? click the Settings button

Next to the store name, click the Edit button

Go to the Server tab

In the Security settings block, check Use SSL ? Yes and save the settings.

Activation of SSL mode through config files

Depending on the version of OpenCart and personal settings, the automatic mode does not always work, in this case, editing the config files will help.

So, open the file manager and go to the site directory.

Open the edit of the config.php file, which is located directly in the site directory

Find the HTTPS_SERVER directive and change http:// to https:// in the site address line, then save the changes to the file.

Go to the admin directory, open the edit of the following config.php file, where in the HTTPS_SERVER and HTTPS_CATALOG directives, also change http:// to https:// and save the changes.

As a result, both files should look like this:


Similar articles