keepcalculator

06 Numbers and Powers

How to Set Up SSL on WooCommerce: Complete HTTPS Guide

Card No. 06·19743 · Updated · Standard formula, shown below

This guide walks you through setting up SSL (Secure Sockets Layer) on your WooCommerce store, turning your site from HTTP to HTTPS. By the end, you’ll have a secure, encrypted connection for all customer data, improved trust, and a better search ranking. You’ll need access to your hosting control panel and WordPress admin dashboard.

What You’ll Need

  • A domain name and hosting account with SSL support (most modern hosts include free SSL via Let’s Encrypt).
  • Access to your hosting control panel (cPanel, Plesk, or custom).
  • WordPress admin credentials.
  • An FTP client or file manager (optional, for manual .htaccess edits).

Step-by-Step

  1. Purchase or activate an SSL certificate. If your host offers free SSL (e.g., Let’s Encrypt), enable it in your hosting control panel. Otherwise, buy a certificate from a provider and install it via your host’s SSL/TLS section.
  2. Install the SSL certificate. In cPanel, look for “SSL/TLSâ€� or “Let’s Encrypt.â€� Follow your host’s instructions to issue and install the certificate for your domain. For paid certificates, you’ll receive a .crt file and a private key; paste them into the appropriate fields.
  3. Verify SSL is active. Visit https://yourdomain.com in a browser. You should see a padlock icon. If you see a warning, the certificate isn’t installed correctly—check the steps above.
  4. Update WordPress site URL to HTTPS. In your WordPress admin, go to Settings → General. Change both “WordPress Address (URL)� and “Site Address (URL)� from http:// to https://. Save changes.
  5. Force HTTPS for all pages. Add the following code to your wp-config.php file (just before the “That’s all, stop editing!â€� line):
    define('FORCE_SSL_ADMIN', true);
    This forces the admin area to use HTTPS. For the front end, you’ll also need to set up a redirect (next step).
  6. Set up a redirect from HTTP to HTTPS. In your .htaccess file (in the root directory), add the following at the top:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    This ensures all visitors are sent to the secure version of your site.
  7. Update any hard-coded URLs. If you have images, links, or scripts with http:// in your theme or plugins, replace them with https://. Use a plugin like “Better Search Replace� to do this across your database safely.
  8. Update your Google Analytics and Search Console. If you use these, change your property URL to the HTTPS version. This prevents tracking issues.
  9. Test your site thoroughly. Browse through your store, add items to cart, and complete a test checkout. Use your browser’s developer tools (F12) to check for “mixed contentâ€� warnings (see Troubleshooting).
  10. Update any external services. If you use payment gateways, shipping APIs, or email services, ensure they are configured with your new HTTPS URL.

Common Mistakes

  • Forgetting to update the site URL in WordPress. If you skip step 4, you’ll get a redirect loop or insecure warnings.
  • Not forcing HTTPS on admin. Without FORCE_SSL_ADMIN, your login page may remain insecure.
  • Mixed content. Some images or scripts still load over HTTP, causing the padlock to disappear. Use a plugin like “Really Simple SSLâ€� to automatically fix mixed content.
  • Using relative URLs incorrectly. If you use relative URLs (e.g., /wp-content/image.jpg), they’ll work fine, but absolute URLs with http:// will break.
  • Not updating CDN or caching plugins. If you use a CDN, update the SSL setting there. Clear your caching plugin’s cache after making changes.

Tips

  • Use a plugin like “Really Simple SSLâ€� to automate the process—it detects your SSL and updates URLs and redirects for you.
  • Keep your SSL certificate renewed. Let’s Encrypt certificates expire every 90 days. Most hosts auto-renew, but check your settings.
  • Test with an SSL checker tool (e.g., SSL Labs) to ensure your certificate chain is correct.
  • Update your sitemap and resubmit it to Google Search Console to speed up indexing of HTTPS pages.
  • Use a staging site to test the SSL setup before applying it to your live store.

Troubleshooting

Redirect loop error: This usually happens when your WordPress URL is still set to HTTP but you’ve added a redirect. Fix by updating the site URL in Settings → General, or temporarily remove the .htaccess redirect.

Mixed content warnings: Your browser console will show “Mixed Content� errors. Use a plugin like “Better Search Replace� to replace http:// with https:// in your database. Also check your theme and plugin settings for hard-coded URLs.

SSL certificate not trusted: Ensure your certificate is issued for the correct domain (including www vs non-www). Your host can help reissue it.

Site becomes inaccessible after changing URLs: If you can’t access your admin, use FTP or your hosting file manager to edit wp-config.php and add the following line to override the site URL temporarily:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');

Payment gateway not working: Some gateways require you to update your callback URLs to HTTPS. Check your gateway settings in WooCommerce.

Frequently Asked Questions

Q: Do I need a dedicated IP address for SSL?
A: No, with SNI (Server Name Indication) technology, you can use SSL on shared hosting without a dedicated IP.

Q: Will SSL slow down my site?
A: Slightly, but modern servers and HTTP/2 mitigate this. You can enable caching and use a CDN to offset any performance impact.

Q: How do I know if my SSL is working?
A: Visit your site and look for the padlock icon. Also, use an online SSL checker to verify the certificate details.

Q: Can I use a free SSL certificate for WooCommerce?
A: Yes, Let’s Encrypt certificates are secure and widely accepted. They are just as good as paid ones for encryption.

Q: What is mixed content and why is it bad?
A: Mixed content occurs when a page loads over HTTPS but includes resources (images, scripts) over HTTP. Browsers block these, causing broken features and a padlock warning.

Q: Do I need to update my sitemap after switching to HTTPS?
A: Yes, update your sitemap URL and resubmit it to Google Search Console to help search engines crawl your new HTTPS pages.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →