All Collections
SSL certificates
Mixed content
How to fix mixed content error in OpenCart?
How to fix mixed content error in OpenCart?
All about mixed content issues and how to fix them in OpenCart
Updated over a week ago

Mixed content means that you are trying to load images or other content with HTTP instead of HTTPS in their links. To fix this, you would simply need to edit all the links on your page to have HTTPS at the beginning instead.

First, make sure that both config.php files (one in your root public_html directory and one in /admin/config.php directory) have HTTPS URLs leading to your domain. In the File Manager, you can easily perform the needed replacement: press Ctrl + H, insert http:// to the first field, and https:// to the second one. After this choose replace all:

If you still see some leftover mixed content, in your OpenCart admin dashboard open Settings Server. In the Security section set Use SSL to Yes:

Now your website shall be working with HTTPS 😊

If you still see that you have some Mixed content on the website, you can add this line to your .htaccess file:

Header always set Content-Security-Policy: upgrade-insecure-requests

It will also force all mixed content to use HTTPS.

That's all! You are good to go and shall have your website displayed as Secure now! 😊

Did this answer your question?