{"id":6509,"date":"2024-06-18T13:18:37","date_gmt":"2024-06-18T13:18:37","guid":{"rendered":"https:\/\/www.smarthost.au\/blog\/?p=6509"},"modified":"2024-06-18T13:19:22","modified_gmt":"2024-06-18T13:19:22","slug":"enable-ssl-certificate-in-open-cart","status":"publish","type":"post","link":"https:\/\/www.smarthost.au\/blog\/enable-ssl-certificate-in-open-cart","title":{"rendered":"Enable SSL certificate in Open Cart"},"content":{"rendered":"\n<p>To turn the SSL certificate on and enable access to the website via https (green padlock), we must perform the following steps:<\/p>\n\n\n\n<p>First, log in to cPanel and go to the File Manager. There, we can find a folder containing the Open Cart system files, and the &#8216;config.php&#8217; file in the folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"452\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5.png\" alt=\"\" class=\"wp-image-6512\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5.png 979w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5-300x139.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5-768x355.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5-520x240.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th5-740x342.png 740w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure><\/div>\n\n\n<p>Then, we edit the line:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>\/\/ HTTPS\n<code>define('HTTPS_SERVER', 'http:\/\/clientsdomain.smarthost.eu\/');<\/code><\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>replacing <code>http:\/\/ <\/code>with <code>https:\/\/ <\/code>and giving the name of our domain (or the directory where our system is located).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"186\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6.png\" alt=\"\" class=\"wp-image-6515\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6.png 934w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6-300x60.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6-768x153.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6-520x104.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th6-740x147.png 740w\" sizes=\"auto, (max-width: 934px) 100vw, 934px\" \/><\/figure>\n\n\n\n<p>Similarly, we proceed with the config.php file in the &#8220;admin&#8221; directory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"475\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7.png\" alt=\"\" class=\"wp-image-6516\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7.png 858w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7-300x166.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7-768x425.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7-520x288.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/th7-740x410.png 740w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><\/figure>\n\n\n\n<p>Then, we log in to the management panel of our store and go to &#8220;System -&gt; Settings&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"364\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj4-1.png\" alt=\"\" class=\"wp-image-6521\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj4-1.png 721w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj4-1-300x151.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj4-1-520x263.png 520w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/figure>\n\n\n\n<p>Next, we click on the pencil icon next to the name of our store.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"172\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4.png\" alt=\"\" class=\"wp-image-6523\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4.png 1024w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4-300x50.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4-768x129.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4-520x87.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/4-740x124.png 740w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, we go to the &#8220;Server&#8221; tab, find &#8220;Use SSL&#8221; and check &#8220;YES&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"622\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6.png\" alt=\"\" class=\"wp-image-6524\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6.png 1025w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6-300x182.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6-768x466.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6-520x316.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/zdj6-740x449.png 740w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/figure>\n\n\n\n<p>There is also an alternative method but it is not recommended due to complications that may arise after modifying the .htaccess file.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This method can be used by advanced users at their own risk.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If there are RewriteCond and RewriteRule rules in the .htaccess file, try adding the rule:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>RewriteCond %{REQUEST_URI} !^\/.well-known\/acme-challenge\/[0-9a-zA-Z_-]+$<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The rule above is responsible for redirecting to https or to the index.php file. An example configuration of the .htaccess file with additional rules already inserted may look like this:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>RewriteCond %{HTTPS} !=on<br>RewriteCond %{REQUEST_URI} !^\/.well-known\/acme-challenge\/[0-9a-zA-Z_-]+$<br>RewriteRule ^.*$ https:\/\/%{SERVER_NAME}%{REQUEST_URI} [R,L]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To turn the SSL certificate on and enable access to the website via https (green padlock), we must perform the following steps: First, log in to cPanel and go to the File Manager. There, we<a class=\"read-more\" href=\"https:\/\/www.smarthost.au\/blog\/enable-ssl-certificate-in-open-cart\">Continue reading<\/a><\/p>\n","protected":false},"author":16,"featured_media":6525,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[262,1021,268,8,42],"tags":[36,1055,75,285,1134],"class_list":["post-6509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel-hr","category-guides","category-https-hr","category-security","category-ssl-certificates","tag-https","tag-open-cart","tag-security","tag-ssl-hr","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/comments?post=6509"}],"version-history":[{"count":2,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6509\/revisions"}],"predecessor-version":[{"id":6528,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6509\/revisions\/6528"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media\/6525"}],"wp:attachment":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media?parent=6509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/categories?post=6509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/tags?post=6509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}