How to Install a Free SSL Certificate on WordPress (Complete 2026 Guide)
A complete walkthrough for installing a free Let's Encrypt or Cloudflare SSL certificate on WordPress, updating wp_options URLs, and eliminating mixed-content errors without breaking WooCommerce.

Virtual Assistant & Data Entry Specialist

Launching a WordPress site or WooCommerce storefront without a valid SSL certificate immediately triggers browser security warnings and blocks modern payment gateways.
Years ago, getting an HTTPS padlock required buying an annual certificate, generating CSR keys manually, and paying hosting support to install it.
Today, every serious WordPress site can run strong TLS 1.3 encryption completely free—with automatic 90-day renewals—using either Let's Encrypt on your host or Cloudflare at the DNS edge.
Across seven years managing WordPress and WooCommerce catalogs for store owners in the US, UK, and Australia, I still see the same mistake.
People turn on SSL in their hosting panel, forget to update internal database URLs, and end up with redirect loops or mixed-content warnings.
In this guide, I walk through the exact sequence I use to enable free SSL on WordPress, clean up legacy http:// links inside the database, and verify that checkout and admin routes stay fast and secure.
Four-Layer HTTPS Migration Pipeline
Why Free SSL Is Non-Negotiable for WordPress & E-Commerce
An SSL/TLS certificate encrypts the connection between a visitor's browser and your web server so login credentials, contact form entries, and checkout details cannot be intercepted in transit.
Beyond visitor trust, HTTPS directly affects search visibility, analytics accuracy, and store functionality:
- Payment Gateway Compliance: Stripe, PayPal, and WooCommerce Payments refuse live checkout tokens on unencrypted
http://pages. - Browser Padlock & Conversion Rate: Chrome, Safari, and Edge label plain HTTP pages as "Not Secure," which causes shoppers to abandon product pages before adding items to cart.
- SEO & HTTP/2 Speed: Google treats HTTPS as a baseline ranking factor, and modern browsers only unlock multiplexed HTTP/2 and HTTP/3 speeds over encrypted TLS connections.
- Clean Referral Data: When traffic moves from an HTTPS search engine to an HTTP site, referral headers are stripped—making Google Analytics report organic traffic as "Direct."
Let's Encrypt vs. Cloudflare SSL: Which Method Should You Use?
Before clicking anything inside WordPress Admin, check which free SSL layer fits your hosting setup. Both options cost zero dollars and never expire when configured properly.
| Method | How It Works | Best For | Renewal Model |
|---|---|---|---|
| Host AutoSSL / Let's Encrypt | Issued directly on your origin server via cPanel, Plesk, or Certbot. | Sites using default host DNS with zero CDN proxy. | Automatic every 60–90 days via host cron. |
| Cloudflare Origin + Edge SSL | Free 15-year Origin Certificate on host + Universal Edge SSL at Cloudflare. | Sites behind Cloudflare CDN needing DDoS & WAF protection. | Edge auto-renews; Origin lasts up to 15 years. |
| SSL Plugin Only (Fallback) | Rewrites front-end asset URLs at runtime via PHP output buffering. | Temporary bridge if host blocks database search-replace. | Does not issue a certificate by itself. |
Following the official Let's Encrypt setup model via your hosting dashboard is the cleanest starting point because it secures your origin server even if you never add a CDN.
Step 1: Issue the Free Certificate on Your Hosting Server
Always start on your hosting account rather than inside WordPress plugins. A plugin cannot generate a trusted server certificate on its own unless it wraps ACME verification APIs.
- Check cPanel SSL/TLS Status or Let's Encrypt: Log into cPanel, CyberPanel, Hostinger hPanel, or SiteGround Site Tools and open the SSL/TLS section.
- Enable AutoSSL for Both Root & WWW: Ensure both
yourdomain.comandwww.yourdomain.comare checked before clicking Run AutoSSL or Install. - On a VPS (Nginx/Apache): If you manage an Ubuntu server directly, install Certbot and run
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.comso renewal runs automatically via systemd timer. - Test HTTPS Directly First: Open
https://yourdomain.com/wp-login.phpin an incognito window to verify the certificate is trusted before changing WordPress settings.
Step 2: Configure Cloudflare Full (Strict) Without Redirect Loops
If you route your domain through Cloudflare for caching and security, SSL misconfiguration is the number-one reason WordPress sites enter an infinite "ERR_TOO_MANY_REDIRECTS" loop.
That loop happens when Cloudflare is left on Flexible mode: Cloudflare connects to your server over plain HTTP (port 80), WordPress sees an HTTP request and redirects back to HTTPS, and the loop repeats forever.
As documented in the Cloudflare Full (Strict) SSL specification, follow these four settings:
- Keep a valid Let's Encrypt certificate or a free 15-year Cloudflare Origin CA certificate installed on your hosting server.
- Inside Cloudflare Dashboard → SSL/TLS → Overview, switch encryption mode to Full (Strict).
- Under SSL/TLS → Edge Certificates, enable Always Use HTTPS and Automatic HTTPS Rewrites.
- Wait two minutes, then test both
http://andhttps://versions of your homepage to confirm a single clean 301 redirect.
Step 3: Update WordPress URLs & Fix Mixed-Content Warnings
Once the server answers cleanly over HTTPS, WordPress still stores absolute URLs inside its MySQL database—especially in product descriptions, customizer backgrounds, and media attachments.
When I migrate or audit WooCommerce and WordPress catalogs, mixed content is almost always caused by legacy image links imported from older CSV feeds or theme demo content.
Update WordPress Address & Site Address
In your WordPress Admin, open Settings → General and change both WordPress Address (URL) and Site Address (URL) from http:// to https://.
You can also lock them inside wp-config.php above the "That's all, stop editing" line if you manage multiple staging environments:
define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );
define( 'FORCE_SSL_ADMIN', true );
Replace Hardcoded HTTP Links in the Database
Never run raw SQL REPLACE() queries directly on wp_postmeta or wp_options. WordPress stores theme settings in PHP-serialized strings where changing length breaks layouts.
Instead, use a serialization-aware tool, just as recommended in the WordPress HTTPS Administration Handbook:
- With WP-CLI (Fastest & Zero Plugin Bloat): Run a dry run first to preview affected rows, then execute the replacement across all tables.
- Without SSH Access: Use the free Better Search Replace plugin to swap
http://yourdomain.comtohttps://yourdomain.comacross all tables, then deactivate and delete the plugin when finished.
# 1. Take a safety backup first
wp db export pre-ssl-backup.sql
# 2. Preview changes (dry-run)
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables --dry-run
# 3. Apply serialization-safe update & flush cache
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables
wp cache flush
If you manage thousands of external supplier image links inside a store catalog, review our WooCommerce bulk product upload workflow so HTTPS CDN URLs are validated before import.
Step 4: Enforce 301 HTTPS Redirects & Run Final QA
Search engines treat http:// and https:// as separate URLs unless you enforce a permanent 301 (or 308) redirect at the server or edge layer.
If you are not using Cloudflare's "Always Use HTTPS" rule on an Apache host, add this block at the very top of your .htaccess file above the WordPress rewrite rules:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
Once saved, complete this five-point verification checklist before calling the migration done:
- Open Chrome DevTools → Console and Security tabs on your homepage, a blog post, and your checkout page to confirm zero mixed-content warnings.
- Run
curl -I http://yourdomain.comin a terminal to verify a single clean301or308hop straight tohttps://. - Check Elementor or block-theme CSS regeneration if you use a page builder (Elementor → Tools → Regenerate CSS & Data + Replace URL).
- Update your Google Search Console property to a Domain property or
https://prefix and resubmit your XML sitemap. - If you are planning a larger platform move later, study our 301 redirect mapping guide so you never drop link equity during URL changes.
Field Note: How I Untangled a WooCommerce Flexible-SSL Redirect Loop
A few years ago, an online store owner reached out in a panic after flipping on Cloudflare SSL right before a weekend promotion.
Every visitor clicking a product link—and even the owner trying to open /wp-admin/—hit an infinite ERR_TOO_MANY_REDIRECTS error screen.
My first instinct was to check .htaccess, because Apache rewrite rules are a common culprit. Everything inside .htaccess looked clean.
When I ran curl -I from my terminal, the response headers revealed what was happening: Cloudflare was hitting the origin server over plain port 80 because SSL mode was left on Flexible.
Meanwhile, WooCommerce's "Force secure checkout" option saw port 80 traffic and sent a 301 redirect back to HTTPS—creating an endless ping-pong loop between edge and host.
Here is the exact ten-minute fix I ran to restore checkout without touching a single plugin:
- I opened the hosting panel, issued a free Let's Encrypt certificate covering both root and
wwwsubdomains, and verified port 443 answered cleanly. - Next, I switched Cloudflare from Flexible to Full (Strict) and cleared the edge cache.
- Finally, I ran
wp search-replacevia WP-CLI to convert 1,400 legacyhttp://supplier product images stored inwp_postsandwp_postmeta.
Once the database sweep finished, I ran a final headless check across the cart, checkout, and category archives to verify every font, script, and stylesheet loaded over TLS 1.3.
The admin dashboard came back within sixty seconds, checkout loaded with a clean padlock, and zero SSL plugins were needed afterward. Keeping the fix at the DNS and database layers also preserved fast server response times during the weekend sale.
Automating Certificate Renewal Alerts & Clean Security Headers
Once your WordPress storefront loads cleanly over HTTPS with zero mixed-content console errors, the only long-term failure mode left is an unnoticed certificate expiration ninety days later. Free Let's Encrypt certificates renew automatically on most managed hosts, yet custom Cloudflare origin rules, changed DNS records, or full disk partitions occasionally block renewal challenges quietly until shoppers hit scary browser warning screens.
After closing out every SSL setup, I confirm two automated safeguards before handing credentials back to the site owner: verify a test renewal dry-run succeeds cleanly on the server or Cloudflare Edge Certificates panel, and register the primary domain on an uptime monitor set to alert fourteen days prior to SSL expiry. Once you confirm zero HTTP subdomains or external legacy webhooks still rely on unencrypted endpoints, enabling HSTS (Strict-Transport-Security) with a short initial max-age ensures modern browsers upgrade connections locally before ever hitting redirect hops, while keeping checkout pages fast and trusted across desktop and mobile browsers.
Frequently Asked Questions
Common operational inquiries related to How to Install a Free SSL Certificate on WordPress (Complete 2026 Guide)
Need High-Volume WooCommerce or Shopify Catalog Migration?
Eliminate broken variation CSVs and mismatched attributes. Schedule a free 15-minute call to review SKU counts, taxonomy structure, and bulk import timelines.

Written by Wp Hossain (Mikail Hossain)
Senior Catalog & E-Commerce Specialist with 7+ years handling multi-thousand-SKU WooCommerce, Shopify, and supplier CSV migrations (4.9/5 across 82 Fiverr reviews).