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
- 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.
- 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.
- Verify SSL is active. Visit
https://yourdomain.comin a browser. You should see a padlock icon. If you see a warning, the certificate isn’t installed correctly—check the steps above. - 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://tohttps://. Save changes. - Force HTTPS for all pages. Add the following code to your
wp-config.phpfile (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). - Set up a redirect from HTTP to HTTPS. In your
.htaccessfile (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. - Update any hard-coded URLs. If you have images, links, or scripts with
http://in your theme or plugins, replace them withhttps://. Use a plugin like “Better Search Replace� to do this across your database safely. - Update your Google Analytics and Search Console. If you use these, change your property URL to the HTTPS version. This prevents tracking issues.
- 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).
- 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 withhttp://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
- China’s IPv9 Decimal Network Project Explained
- Fix Wired Earbuds That Only Work in One Ear
- What to Check Before Buying the Dip in Indian Shares
- Cool Raspberry Pi Projects: 15 Ideas for Any Skill Level3
- Terraform vs Kubernetes: Key Differences
- Internet Connectivity in Remote Areas: Options0.80 USD/GB