How to fix mixed content on OpenCart

Ensure every resource (images, scripts, stylesheets, fonts, iframes) on your store is loaded over HTTPS, never HTTP, so browsers never block or warn about mixed content.

Steps for OpenCart

  1. Go to Admin → System → Settings → Edit your store → Server tab. Confirm 'Use SSL' is set to Yes.
  2. In config.php and admin/config.php (root of your server), ensure HTTP_SERVER and HTTP_CATALOG constants use 'https://'.
  3. Search theme template files (catalog/view/theme/yourtheme/) for hardcoded 'http://' URLs and update them.
  4. Clear the cache: Admin → Dashboard → the gear icon → Refresh.
  5. Re-test with browser DevTools Console.
Official OpenCart documentation ↗

What is mixed content?

Mixed content happens when a webpage is served securely over HTTPS but one or more of its resources — images, JavaScript files, CSS stylesheets, fonts, videos, or iframes — are still requested over the old, unencrypted HTTP protocol. Browsers treat this as a security problem because the page itself is encrypted but parts of it are not. Modern browsers either silently upgrade, actively block, or display a security warning when they detect mixed content. The result is a broken or degraded experience for your shoppers.

Mixed content can break visible elements on your store (images that won't load, styles that don't apply, widgets that silently fail), directly hurting conversion rates. Browsers like Chrome and Firefox block "active" mixed content (scripts and stylesheets) outright, meaning functionality you depend on — checkout widgets, live chat, reviews — may simply stop working. A broken padlock icon or "Not Secure" warning in the address bar destroys shopper trust at the exact moment they are deciding whether to buy. Search engines also use HTTPS as a ranking signal, and a compromised security indicator can undermine the SEO benefit your SSL certificate is supposed to provide.

See the complete Mixed content guide for every platform and the full background.

Not sure if your OpenCart store has this?

Run a free SEOLZ scan — we’ll find mixed content and every other issue across your whole site.

Scan my site free

Fix mixed content on another platform