New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

SSL

Learn how to fix WordPress SSL certificate errors.

Padlock warnings usually come from expired certificates, wrong DNS, or WordPress still serving http:// assets. This tutorial covers host certificates, WordPress URL settings, redirects, and mixed content without breaking login cookies.

Time: 30-60 minutes Level: Intermediate
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

  • Expired or missing certificate on the server
  • Certificate issued for www but visitors use apex, or the reverse
  • Cloudflare or CDN SSL mode mismatch with origin host
  • WordPress siteurl and home still set to http://
  • Mixed content: images, CSS, or scripts loaded over http:// on an https:// page

Step 1: Verify the certificate at the host

Log into hosting and open SSL/TLS or Let’s Encrypt. Confirm a valid certificate exists for every hostname you use publicly. Test both https://example.com and https://www.example.com in a private browser window.

Step 2: Set WordPress to HTTPS

In wp-admin go to Settings → General. Set both WordPress Address and Site Address to https://. If admin will not load, set URLs in wp-config.php instead. Open wp-config.php in your site root, next to wp-admin and wp-content:

php
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Replace example.com with your live domain. Use the canonical hostname you want in Google Search Console, usually apex or www, not both without redirects.

Step 3: Force HTTPS in .htaccess (Apache)

On Apache hosts, find .htaccess in your site root, next to wp-admin and wp-content. Back up the file first, then add this above the WordPress rewrite block:

apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Nginx users need a server block change from the host or a managed redirect rule. Do not paste Apache rules into nginx.

Step 4: Fix mixed content

Open browser DevTools → Console on an https:// page. Mixed content warnings list http:// URLs for images, scripts, or CSS. Common fixes:

  • Run a search-replace on the database from http:// to https:// for your domain only, with a backup first.
  • Re-save permalinks under Settings → Permalinks.
  • Clear page cache and CDN cache after URL changes.
  • Update hardcoded http:// links in widgets, page builders, or theme customiser fields.

If your host offers SSH access, you can run WP-CLI search-replace from the WordPress root on staging. These commands need server access and will not work inside File Manager:

bash
cd /path/to/wordpress
wp search-replace 'http://example.com' 'https://example.com' --all-tables --dry-run
wp search-replace 'http://example.com' 'https://example.com' --all-tables

Step 5: Test login and checkout

After SSL changes, log out and log in again. WooCommerce checkout and contact forms should submit over https:// without browser warnings. Cookie issues often mean WordPress URL and redirect rules disagree.

When to stop DIY and hire help

If certificate renewal and URL fixes do not resolve padlock warnings, the issue may involve CDN configuration or mixed content buried in theme files. BugShield resolves SSL certificate errors at a confirmed price without hourly billing surprises.

Questions answered

WordPress SSL certificate error FAQs

Answers about certificate expiry, hostname mismatches, DNS, Cloudflare, and restoring a trusted HTTPS connection.

Why does SSL work in admin but not the front end?

Mixed content or a cache layer serving old http:// HTML. Clear caches and fix hardcoded http:// asset URLs in content or theme files.

Do I need an SSL plugin?

Plugins can help mixed content on legacy sites, but correct certificates and URLs at the host are the real fix. Plugins do not replace an expired cert.

How do I fix NET::ERR_CERT_DATE_INVALID?

The certificate expired or the server clock is wrong. Renew via Let’s Encrypt or your host, then confirm auto-renewal is enabled.

Can BugShield fix SSL for me?

Yes. SSL and DNS mismatches are common emergency fixes. You get a confirmed quote and a developer who verifies HTTPS end to end.

What causes a WordPress SSL certificate error?

Common causes include an expired certificate, the wrong hostname, incomplete certificate chain, recent DNS move, incorrect server binding, or a CDN SSL mode that does not match the host.

How do I renew an expired WordPress SSL certificate?

Renew it through your host or certificate provider, install the renewed certificate and intermediate chain, then confirm automatic renewal can complete before the next expiry.

Can DNS changes cause a WordPress SSL certificate error?

Yes. If DNS points visitors to a server without the correct certificate, HTTPS fails even when the old host was configured properly. Check the current A, AAAA, and CNAME records.

What is an incomplete SSL certificate chain?

The server is not sending one or more intermediate certificates needed to connect your site certificate to a trusted authority. Reinstall the full certificate bundle supplied by the issuer.

Which Cloudflare SSL mode should a WordPress site use?

Use Full (strict) when the origin has a valid certificate. Flexible mode can create redirect loops because Cloudflare uses HTTP between its edge and your WordPress server.

When should a developer fix a WordPress SSL certificate error?

Get help when the certificate is installed but the wrong one is served, redirects loop, DNS recently changed, or checkout and login pages remain untrusted.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix