Black Friday: 50% off the first billing period of every WordPress hosting plan, until December 1 inclusive

See the plans
Skip to content
See the plans

Security 11 min read

Move WordPress to HTTPS: Free SSL Certificate, Step by Step

Free WordPress SSL certificate, step by step: install it, switch to HTTPS, add a 301 redirect, fix mixed content, set up HSTS and solve common errors.

To move WordPress to HTTPS, first install an SSL certificate (free with Let’s Encrypt, and usually provided by your host), then change http:// to https:// in both addresses under Settings > General, 301-redirect all old traffic to HTTPS and fix any mixed content. Allow about half an hour for a typical site, backup included.

Guide current as of 26 November 2026. Certificate lifetimes quoted come from the CA/Browser Forum and Let’s Encrypt; WP-CLI commands assume SSH access to the server; alternatives without SSH are given.

Key takeaways

  • A free certificate encrypts exactly as well as a paid one: the difference is identity vetting, not connection security.
  • Certificates are getting shorter-lived: 200 days maximum since 15 March 2026, 100 days from 15 March 2027. Automatic renewal is now a must.
  • Order of work: backup, certificate, WordPress addresses, 301 redirect, mixed content, Search Console.
  • Since WordPress 5.7, Site Health offers a one-click switch to HTTPS when the server supports it.
  • Fix mixed content properly with wp search-replace, always with a --dry-run first.
  • HSTS is powerful but unforgiving: start with a short max-age.

What is an SSL certificate and why does WordPress need one?

An SSL certificate (strictly a TLS certificate; TLS replaced SSL long ago) lets the browser confirm it is talking to your server and encrypts everything exchanged: passwords, forms, payment details. Without one, browsers show “Not secure” next to your address.

Beyond privacy, HTTPS gates much of the modern web. Browsers only use HTTP/2 and HTTP/3 over encrypted connections; HTTP/3 runs on QUIC, which has TLS 1.3 built in (RFC 9001). Our article on HTTP/3 and QUIC for WordPress explains what that means for speed. Online payments, geolocation and push notifications also require a secure page, and since WordPress 5.7 Site Health lists a site without HTTPS as a critical issue.

Free or paid SSL certificate: which should you choose?

For a WordPress site, online stores included, a free domain-validated (DV) certificate is enough in the vast majority of cases. Encryption is identical to a paid certificate. Paid OV and EV certificates add checks on the organisation, which browsers no longer display prominently in the address bar.

TypeWhat is checkedCostWho it suits
DV (domain validation)Control of the domain nameFree (Let’s Encrypt) or lowBrochure sites, blogs, stores
OV (organisation validation)Domain plus the company’s existencePaidContractual or compliance requirements
EV (extended validation)In-depth company checksMost expensiveVery specific cases
Wildcard (*.example.com)All subdomains at one levelFree or paidMany subdomains
The main types of TLS certificates (November 2026).

Let’s Encrypt, the most widely used free certificate authority, only issues DV certificates. It checks that you control the domain, usually by fetching a temporary file over HTTP from your site (the HTTP-01 challenge). The practical consequence: the domain must already point to the server before the certificate can be issued.

How long does an SSL certificate last in 2026?

Less and less. Since 15 March 2026, a public certificate cannot be valid for more than 200 days; that cap drops to 100 days on 15 March 2027 and to 47 days on 15 March 2029. Let’s Encrypt, which issues 90-day certificates, will move its default to 64 days in February 2027 and 45 days in February 2028.

DateRuleSource
15 March 2026Maximum validity: 200 daysCA/Browser Forum, ballot SC-081v3
10 February 2027Let’s Encrypt default profile: 64 daysLet’s Encrypt
15 March 2027Maximum validity: 100 daysCA/Browser Forum
16 February 2028Let’s Encrypt default profile: 45 daysLet’s Encrypt
15 March 2029Maximum validity: 47 daysCA/Browser Forum
Timeline for shorter public TLS certificate lifetimes.

The schedule was adopted by the CA/Browser Forum, which brings together certificate authorities and browser makers, through ballot SC-081v3. Let’s Encrypt set out its own timeline in Decreasing Certificate Lifetimes to 45 Days. The takeaway is simple: manually renewed certificates are no longer workable. Make sure your host renews certificates automatically, as it does for the free certificates included with Hosterwise plans.

Step 1: how do you get and install the certificate?

The easiest route is to let your host issue and renew it automatically. In CyberPanel, the control panel included with Hosterwise plans, you issue a Let’s Encrypt certificate from the SSL section once the domain points to the server; at Hosterwise every hosted site gets a free certificate.

According to the CyberPanel documentation, the path is SSL > Manage SSL, then pick the domain and click Issue SSL. If issuance fails, the usual suspects are:

  • the domain or the www subdomain doesn’t point to the server yet (DNS still propagating);
  • a DNS CAA record doesn’t allow Let’s Encrypt;
  • a redirect rule or firewall blocks /.well-known/acme-challenge/.

To check the installed certificate, its dates and the names it covers:

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

Make sure both example.com and www.example.com are listed: a missing variant is a classic cause of certificate errors.

Step 2: how do you switch WordPress addresses to HTTPS?

Take a backup, then change http:// to https:// in WordPress Address (URL) and Site Address (URL) under Settings > General. You’ll be logged out; log back in over HTTPS. If the server is ready, the Site Health button does the same in one click.

  1. Settings > General: edit both addresses and save.
  2. Tools > Site Health: when WordPress detects that HTTPS works, the HTTPS section shows an update button. Added in WordPress 5.7, it checks HTTPS support before switching and rolls back if the check fails.
  3. Command line, if your host gives you SSH access (Hosterwise does not: use one of the two methods above):
wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'

If the fields are greyed out, WP_HOME and WP_SITEURL are defined in wp-config.php: edit them there. While you’re in that file, add define( 'FORCE_SSL_ADMIN', true ); to force HTTPS for logins and the admin area, as recommended in the official HTTPS documentation.

Step 3: how do you redirect HTTP to HTTPS?

Add a permanent (301) redirect from every http:// address to its https:// equivalent. On a LiteSpeed or Apache server, a few lines in .htaccess do it; some hosts also offer a “force HTTPS” switch. The redirect keeps your rankings and existing links intact.

Place these lines above the # BEGIN WordPress block in the .htaccess file at the site root (at Hosterwise, open it with CyberPanel’s File Manager):

# Redirect HTTP to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

Then check with curl: you should get a 301 with an HTTPS location header.

curl -sI http://example.com/some-page/ | grep -iE '^(HTTP|location)'
# HTTP/1.1 301 Moved Permanently
# location: https://example.com/some-page/

If your site sits behind a proxy or CDN that terminates HTTPS for you, this rule can cause a redirect loop: see the “too many redirects” section below.

Step 4: how do you fix mixed content?

Mixed content is when an HTTPS page loads images, scripts or stylesheets over HTTP. Browsers block or upgrade those resources and may drop the padlock. The lasting fix is replacing old addresses in the database with wp search-replace, then hunting down whatever remains in the theme.

MDN’s page on mixed content explains the mechanism well. In WordPress:

# 1. Dry run: how many replacements?
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --dry-run

# 2. Real run (after backing up the database)
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid

# 3. Clear caches
wp cache flush
wp litespeed-purge all

search-replace handles serialised data correctly, which a raw SQL replace would break. Without SSH access (the case at Hosterwise, as a security choice), a search-and-replace plugin does the same job from the dashboard, or our 24/7 support runs the wp search-replace for you; then purge the cache from the LiteSpeed Cache menu.

Worth knowing: when an existing site switches to HTTPS through Site Health, WordPress also rewrites insecure URLs for your own domain on the fly in displayed content. It’s a safety net, not a fix: the database still holds HTTP addresses, and theme files and third-party resources aren’t covered. Open the browser console (F12) to find leftovers: each mixed-content resource is flagged there. Usual culprits are hard-coded URLs in the theme, custom CSS or widgets, and third-party services called over http://.

Step 5: should you turn on HSTS?

HSTS is a header that tells browsers to use only HTTPS for your domain for a set time, without even trying HTTP. It adds protection against interception, but a misconfiguration can lock visitors out: enable it only once everything works over HTTPS, and start with a short duration.

The mechanism is defined in RFC 6797. On a server that honours the Header directive in .htaccess, a cautious first setting looks like this:

<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=300"
</IfModule>

Raise the duration gradually (max-age=86400 for a day, then 31536000 for a year). Only add includeSubDomains if every subdomain, including mail and external tools, works over HTTPS, and think hard before submitting to the browser preload list at hstspreload.org: getting off it takes months. If you’re unsure whether the directive is applied, check with curl -sI https://example.com/ or ask support. At Hosterwise, LiteSpeed Enterprise reads .htaccess like Apache, Header directive included.

Step 6: what should you do after the switch?

To Google, moving from HTTP to HTTPS is a site move with URL changes: the 301 redirects do most of the work. Verify the HTTPS property in Search Console, submit the HTTPS sitemap and update the address in your other tools (analytics, social profiles, email campaigns).

Google explicitly lists HTTP to HTTPS in its guide to site moves with URL changes. Your post-switch checklist:

  • Search Console: a “domain” property already covers HTTP and HTTPS; otherwise add the https:// property and submit the sitemap (Yoast SEO serves it at /sitemap_index.xml).
  • Internal links: Step 4 should have fixed them; double-check menus and footer.
  • External tools: site URL in Google Analytics, social profiles, email signatures, directories.
  • Configuration test: the free Qualys SSL Labs SSL Server Test grades your server’s TLS setup and flags incomplete certificate chains.

What are the most common SSL errors?

Redirect loops, a certificate that doesn’t cover www, an expired certificate and a padlock broken by mixed content. Each can be diagnosed in minutes with the browser or curl.

SymptomLikely causeFix
ERR_TOO_MANY_REDIRECTSProxy or CDN contacts the server over HTTP while WordPress insists on HTTPSSet the CDN to full HTTPS mode, or apply the HTTP_X_FORWARDED_PROTO check from the WordPress docs
NET::ERR_CERT_COMMON_NAME_INVALIDCertificate doesn’t cover www (or the bare domain)Reissue the certificate for both names
Expired certificateAutomatic renewal failing (DNS changed, rule blocking /.well-known/)Fix the cause, then reissue
Broken or missing padlockMixed contentwp search-replace, browser console
Certificate won’t issueDNS not propagated, restrictive CAA recordWait for propagation, adjust CAA
Diagnosing the most common HTTPS errors on WordPress.

For redirect loops behind a proxy, the official docs suggest this block in wp-config.php, before the line that loads WordPress:

if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && str_contains( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) ) {
	$_SERVER['HTTPS'] = 'on';
}

Only add it if your site really sits behind a trusted proxy or CDN: on a directly exposed server, any visitor can forge that header.

HTTPS included on every site with Hosterwise

HTTPS is one of the fundamentals in our WordPress security checklist. At Hosterwise, every hosted site gets a free, automatically renewed SSL certificate, and our LiteSpeed Enterprise servers deliver your pages over HTTP/2 and HTTP/3. Moving an existing site? Our WordPress migration guide explains why the certificate is only issued after the DNS switch, and our team handles it as part of the free migration.

Keep a recent backup of your site before changing any address. To host your sites with SSL included, compare our WordPress hosting plans; and if you don’t have an address yet, you can register your domain name in the same place.

HTTPS and SSL in WordPress: FAQ

Is a free SSL certificate as secure as a paid one?

Yes, for encryption: same protocols, same strength. A paid OV or EV certificate only adds identity checks on the organisation, which browsers no longer highlight. For most WordPress sites, a free certificate is all you need.

Will switching to HTTPS hurt my SEO?

Not if every old URL 301-redirects to its HTTPS version. Google treats the switch as a site move: some temporary fluctuation is possible while pages are reindexed, with no lasting loss when redirects are right.

Do I need a plugin like Really Simple SSL?

No. The Site Health button, an .htaccess redirect and wp search-replace cover the essentials. A plugin can help without file access, but server-level configuration is lighter and more durable.

Why does my site still show “Not secure”?

Either the address visited is still HTTP (no redirect), the page loads HTTP resources (mixed content), or the certificate isn’t valid for that name. The browser console (F12) and curl -I will tell you which in seconds.

Does my certificate need to cover www?

Yes, if your domain answers both with and without www. The certificate must cover both names even when one redirects to the other, because that redirect already happens over HTTPS.

Does Hosterwise provide the SSL certificate?

Yes. Every site hosted at Hosterwise gets a free SSL certificate on every plan, renewed automatically. Your domain just needs to point to our servers for the certificate to be issued.

About the author

The Hosterwise team

Hosterwise technical and support team

Written and reviewed by the Hosterwise technical team, who run LiteSpeed servers with CyberPanel every day and help customers migrate, secure and speed up their WordPress sites.

See the plans My account