Get a free website with any plan

See how
APPLICATIONS

Magento 2 SSL

Last updated

IN SHORT

To enable SSL on Magento 2 with Flashcloud, update both the unsecure and secure base URLs to https://, then flush the configuration cache. Magento stores absolute URLs directly in its database. Even with an active certificate, HTTPS will not work properly until you update those URLs and clear stale cache entries.

Fix Magento 2 SSL and mixed content warnings by setting both Secure Base URLs to https://, then flushing the config cache: the fix touches Magento's database, not just the certificate. Magento stores absolute URLs in the core_config_data table, so switching a store to HTTPS is a store-config change as well as a server-side one.

Set the Secure Base URLs first

Magento 2 has separate settings for the unsecure and secure base URL, and both need to point to https:// once your certificate is live. The fastest way, especially if the admin panel itself is unreachable over HTTP, is via SSH:

bin/magento setup:store-config:set --base-url="https://yourdomain.com/" --base-url-secure="https://yourdomain.com/"

If you'd rather do it in the admin, go to Stores → Configuration → General → Web → Base URLs (Secure) and set Base URL and Base Link URL to your https:// address, then set Use Secure URLs on Storefront and Use Secure URLs on Admin to Yes in the section below.

After either method, flush the cache. A stale config cache is the most common reason a Secure Base URL change doesn't seem to take:

bin/magento cache:flush

Confirm the certificate is actually issued

Flashcloud auto-issues a free Let's Encrypt certificate once your domain's DNS points at your hosting, usually within about 5 minutes, and renews it automatically. If HTTPS won't load at all (not just a mixed-content warning inside a working page), check that your domain's DNS is actually resolving to your Flashcloud hosting before troubleshooting Magento itself: an unresolved or still-propagating domain will look identical to a broken cert from the storefront's perspective. If you registered the domain elsewhere, confirm the nameservers are pointed correctly using the steps in Changing nameservers at GoDaddy, Namecheap, and Cloudflare.

Reindex and clear both caches

Magento's own page cache (Full Page Cache) can serve stale HTML with hardcoded http:// asset URLs even after the config is fixed. Reindex and flush everything:

bin/magento indexer:reindex
bin/magento cache:flush

Then hard-refresh the storefront (or open it in a private window) so your browser isn't serving its own cached copy of the old insecure page.

Where PHP and file access come in

Magento 2 is a heavier PHP application than most WordPress installs, and it's picky about PHP version and OPcache behavior. If you're troubleshooting alongside a PHP upgrade, switch versions from the PHP Version tile in the portal (Services → your hosting), see Accessing cPanel for how to get there, which handles versions 7.4 through 8.3 per domain. Check Magento's own system requirements for the release you're running before jumping versions, since Magento ties specific major versions to specific supported PHP ranges. For the CLI commands above, use SSH Access, found in cPanel's Security section.

The site's underlying speed (LiteSpeed, LSCache, and the Cloudflare edge layer) works the same way for Magento as it does for any other PHP app on Flashcloud. See The cache stack we ship with every WordPress install for how the caching layers interact, since Magento's own Full Page Cache sits on top of, not instead of, the server-level cache.

When to contact support

If you've set the Secure Base URLs, flushed the cache, reindexed, and the storefront still won't serve over HTTPS, or you're not sure whether the certificate issued correctly, open a ticket from Support in the portal (portal.flashcloud.com/support/new). A real person can check certificate status and DNS on our side, which rules out half the usual causes before you touch Magento's config again.

Common questions

Why is my Magento store showing mixed content warnings?

Stale full page cache files are serving old http:// links. Run bin/magento indexer:reindex followed by bin/magento cache:flush, then check the site in a private browser window.

How do I get an SSL certificate for my domain on Flashcloud?

Flashcloud auto-issues a free Let's Encrypt certificate within about 5 minutes once your domain's DNS points to your hosting. It also renews automatically.

How do I set base URLs if the Magento admin panel will not load?

Connect via SSH and run bin/magento setup:store-config:set --base-url="https://yourdomain.com/" --base-url-secure="https://yourdomain.com/". Clear the cache immediately afterward by running bin/magento cache:flush.

Which PHP versions can I use for Magento on Flashcloud?

Flashcloud supports versions 7.4 through 8.3 per domain from the PHP Version tile in the portal. Always check your Magento release documentation first, as each major version requires a specific PHP range.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.