Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Set Up SSL on Your OpenCart Store

This guide helps you make your OpenCart shop load with https and the padlock icon.

Online Stores2 min read11 steps

What is SSL?

SSL is a way to lock the link between your visitor and your website. It is like sending a letter in a sealed box instead of on a postcard. A website with SSL starts with https:// and shows a padlock. Online shops need it, because customers type private details.

Before you start

You need an SSL certificate installed on your hosting account first. A certificate is the file that proves your site is real. Ask Hostvento support if you are not sure whether one is installed. You can also check your welcome email or the Services area of the client area.

Changing config files can break your shop. Take a backup first.

Steps

  1. Open your site in a browser and type https:// before your domain name. If the padlock shows with no warning, the certificate works.
  2. Log in to your hosting control panel and open File Manager.
  3. Go to the folder that holds your shop, usually public_html.
  4. Right-click the file config.php and choose Edit. If it is read only, change its permission to 644 first.
  5. Find the line starting with define('HTTP_SERVER'. Change http:// to https://.
  6. Find the line starting with define('HTTPS_SERVER'. Check it also begins with https://. Older OpenCart versions have an extra HTTP_CATALOG or HTTPS_CATALOG line. Change those too.
  7. Save the file.
  8. Open the config.php file inside your admin folder. Make the same change to its lines, then save.
  9. Log in to the OpenCart admin area. Go to System, then Settings, then edit your store.
  10. In the Server tab, set Use SSL to Yes (older versions only). Click Save.
  11. Visit your shop and click through a few pages. Check each one shows the padlock.
Tip: If a page shows a "not secure" warning, an image or file is still loaded with http://. Edit it so it starts with https://.

Quick recap

  • Install the SSL certificate first.
  • Back up, then edit both config.php files to use https.
  • Turn on Use SSL in older versions.
  • Check your pages for the padlock.