How to Install SSL on a WordPress Website
A practical walkthrough for moving WordPress to HTTPS: installing the certificate, updating URLs, fixing mixed content, redirecting and checking the result.
10 min readUpdated Nov 21, 2026By XPASS Editorial Team

Moving a WordPress site to HTTPS sounds like a single switch, but it is really a short sequence: get a certificate, install it where your site is served, tell WordPress to use secure addresses, fix any content that still loads over plain HTTP, and make all old addresses redirect to the new ones. Done in that order, it takes little time and causes little risk. Done in a different order, it can lock you out of the dashboard, break images or produce redirect loops that are hard to diagnose.
This guide walks through the process for a typical WordPress site, whether it sits on shared hosting with a control panel, on a virtual server you manage yourself, or behind a CDN. It also covers testing and the problems that most often appear afterwards.
What HTTPS changes for a WordPress site
HTTPS is HTTP carried inside TLS. When a visitor opens https://www.example.com, the browser and the server agree on encryption keys, and the server presents a certificate showing that it is entitled to use that hostname. The certificate format is the X.509 profile described in RFC 5280. The visitor gets a padlock indicator, and the traffic between browser and server cannot be read or altered easily by someone on the network path.
For a WordPress site this matters in several concrete ways:
- Logins and forms. Passwords and form submissions travel encrypted instead of in plain text.
- Browser warnings. Modern browsers label plain HTTP pages as not secure, especially pages with forms.
- Features that require HTTPS. Some browser features and integrations, such as certain payment, location and service worker functions, require a secure connection.
- Trust. Visitors are less likely to hesitate on a page that shows no warning.
What HTTPS does not do is make the site secure in every sense. It protects the connection, not the WordPress installation. You still need updates, strong passwords, careful plugin choices and backups.

Step 1: decide where TLS is terminated
The certificate is installed where the secure connection ends. For WordPress, there are three common arrangements.
- Shared hosting or managed WordPress hosting. Your host has a control panel with an SSL or TLS section. You install a certificate there, or the host issues one automatically for the domain. WordPress needs no certificate file of its own.
- A virtual server you manage. The web server software, such as Apache or Nginx, holds the certificate and private key. You install them in the server configuration. The guide on installing SSL on Nginx covers that case in detail.
- Behind a CDN, load balancer or reverse proxy. The edge service presents a certificate to visitors, and traffic from the edge to your origin server may use HTTPS, HTTP or a different arrangement. Check how the edge connects to the origin, because the origin may also need a valid certificate.
Knowing which arrangement you have avoids installing a certificate in the wrong place. In all three cases, the WordPress dashboard is not where the certificate goes. Plugins that claim to install certificates usually act as helpers that request them from a provider or adjust redirects; the certificate itself still ends up on the server or hosting platform.
Step 2: get the right certificate
You need a certificate that includes the hostnames visitors use. At minimum, decide whether you serve both example.com and www.example.com, and make sure both names are on the certificate. Options include:
- A single-name certificate for one hostname, which is enough if you redirect everything to one canonical address and that address is the only one browsers contact first. Remember the redirect itself has to happen over HTTPS for the other name too, so many sites still want both names covered.
- A SAN certificate listing several names, for example the bare domain and
www. - A wildcard certificate if you run many subdomains of the same domain. Read whether a new subdomain needs a new wildcard certificate to understand what a wildcard does and does not cover.
Many hosts and control panels can obtain certificates automatically using the ACME protocol in RFC 8555, which is how services such as Let's Encrypt work; their page on how it works explains the validation process. If you buy a certificate from a provider, you will typically generate a private key and a certificate signing request (CSR) on the server, submit the CSR, complete domain validation and then receive the certificate and intermediate files.
Before ordering, confirm that the domain's DNS points to the server where WordPress runs, because validation usually depends on it. If you also run an API or other services under the same domain, the guide on choosing a TLS certificate for multi-host APIs helps you decide whether to share one certificate or split them.
Step 3: install the certificate
The exact clicks differ by host, so treat this as the general pattern.
On a hosting control panel
- Open the SSL/TLS or Security section of the control panel.
- If there is an automatic option for your domain, enable it and wait for the certificate to be issued. This can take a few minutes.
- For a purchased certificate, paste or upload the certificate, the private key (or generate the CSR in the panel so the key stays on the server) and the intermediate bundle in the fields provided.
- Save, then confirm the panel shows the certificate as active for the domain and for
wwwif you use it.
On a server you manage
- Place the certificate chain file and the private key on the server with restrictive file permissions, so only the web server's administrative account can read the key.
- Add or edit the server block or virtual host for your domain to listen on port 443 with TLS enabled, and point it at the certificate and key.
- Test the configuration syntax, then reload the web server.
- Make sure port 443 is open in any firewall or security group.
Behind a CDN or proxy
- Enable HTTPS for the domain in the CDN's settings and let it issue or accept a certificate.
- Choose how the CDN connects to your origin. A mode where the origin also presents a valid certificate is better than one that sends plain HTTP across the network behind the edge.
- If the origin needs a certificate, install one using the steps above.
At this point, open https://www.example.com in a browser. Even though WordPress is still configured for HTTP, you should see the site load with a valid padlock, or at most with some mixed content warnings. If the certificate is wrong or missing, fix that before touching WordPress.
Step 4: update WordPress to use HTTPS
Only after the HTTPS address works should you tell WordPress to use it.
- Back up first. Take a backup of the files and the database. Changing URLs touches many records.
- Change the addresses. In the dashboard, go to Settings and then General. Update both the WordPress Address (URL) and the Site Address (URL) to start with
https://. Save. You may be logged out and asked to sign in again, which is expected. - If you cannot reach the dashboard. Some hosts allow editing the
WP_HOMEandWP_SITEURLvalues in thewp-config.phpfile, or you can update the two options in the database. Do this carefully and keep a backup. - Force secure admin and logins if your setup requires it, by following the current WordPress documentation for your version.
WordPress stores many absolute URLs in the database: in posts, widgets, menus, theme options and plugin settings. After you change the site address, most of these keep the old http:// form. Browsers then try to load images and scripts over HTTP on an HTTPS page, which is the mixed content problem handled in the next step.
Step 5: find and fix mixed content
Mixed content appears when a secure page requests a resource over plain HTTP. Modern browsers block active content such as scripts and may flag or upgrade passive content such as images. You may see a missing image, a broken layout or a padlock with a warning.
To find it, open the browser's developer tools, look at the Console and Network panels on several pages, and read the warnings that name each insecure resource. Typical sources and remedies:
| Source | What to do |
|---|---|
| Images and files inside posts | Update stored URLs to https with a search-and-replace tool that handles serialized data safely, after a backup |
| Theme settings, logos, custom CSS | Re-save the setting or edit the URL to use https or a protocol-relative path |
| Plugin settings and widgets | Check each plugin that stores an address, and update it |
| Hard-coded links in theme files | Edit the template to use WordPress functions that return the correct scheme |
| External scripts, fonts, embeds | Change the address to https; if the provider does not support it, replace the provider |
| Image CDN or offloaded media | Update the base URL in the media plugin and confirm the CDN serves HTTPS |
Be careful with bulk database replacements. WordPress stores some values as serialized data, which includes string lengths, and a naive text replacement can corrupt them. Use a tool designed for WordPress that understands serialized data, test on a copy first, and keep a backup.
Step 6: redirect HTTP to HTTPS
Visitors and search engines will still reach old http:// addresses through bookmarks, links and cached results. Redirect them permanently to the HTTPS version so there is one canonical address per page.
Choose one place to enforce the redirect:
- The hosting control panel, if it offers a "force HTTPS" option.
- The web server configuration, with a rule that sends port 80 requests to the same URL on HTTPS.
- A CDN or proxy setting.
- A WordPress plugin or rule in the site's rewrite configuration.
Use only one layer if you can. Two layers that disagree are the usual cause of redirect loops. A typical loop happens when a CDN connects to your origin over HTTP while WordPress or the server insists on HTTPS, so each side keeps redirecting the other. If you are behind a proxy, WordPress needs to learn that the original request was secure, often by reading a forwarded protocol header that the proxy sets, and the server must be configured to trust it. Follow your host's or CDN's instructions for this.
Also decide on the canonical hostname, with or without www, and redirect the other to it, over HTTPS in both cases.
Step 7: test and monitor
After the redirects, check the site as a visitor would.
- Visit the home page, a post, a category page, the login page and the checkout or contact page if present, using
https://and also the oldhttp://form to confirm the redirect. - In the browser, open the certificate details and note the names, issuer and expiry date.
- Check both
wwwand the bare domain, and any subdomains you use. - Test from a phone on mobile data, not only your office network, and in a private window to avoid cached results.
- Click through forms, embedded videos, maps and payment widgets, since third-party embeds are a frequent source of mixed content.
- Set a reminder or monitoring for the certificate expiry date, and confirm that automatic renewal, if you use it, is actually enabled.
If you use a search console or analytics service, update the property to the HTTPS address and check that the sitemap lists HTTPS URLs.
A plain example
A small bakery runs www.example-bakery.com on shared hosting. The owner opens the control panel, finds the SSL section and enables the automatic certificate for both example-bakery.com and www.example-bakery.com. After a few minutes, the HTTPS address loads with a padlock.
The owner backs up the site, then changes the WordPress Address and Site Address to https://www.example-bakery.com. The home page now shows a broken logo: the logo URL in the theme settings still begins with http://. A quick look at the browser console confirms it. The owner re-saves the logo with the HTTPS address and runs a WordPress-aware search-and-replace on a copy first, then on the live database after a backup. Finally, the control panel's force-HTTPS switch is turned on, and a test of the old http:// link lands on the secure page. The next day the owner checks that the certificate shows a future expiry date and that renewal is automatic.
Limits and what to watch for
- Expiry. A certificate is valid only for a limited time. If renewal fails silently, visitors will see a full-page warning. Monitor the date, as described in the guide to managing SSL across many domains.
- Incomplete chain. If the intermediate certificate is missing, the site may work on your computer but fail on some phones or tools. Always install the full chain.
- Plugins that change URLs. Caching, security and page-builder plugins may store old URLs. Clear caches after the change.
- Hard-coded content. Embedded code from third parties may include
http://links that you must edit by hand. - Mixed hosting layers. CDN, firewall, load balancer and server each may have their own HTTPS setting. Change one thing at a time and test after each change.
- Search visibility. Moving URLs can temporarily change how search engines display the site. Keep redirects permanent and consistent, and avoid changing other things, such as the domain name or page structure, at the same time.
- Not a full security measure. HTTPS does not replace updates, backups, strong credentials or a careful plugin policy.
Summary
Installing SSL on WordPress means installing a certificate where the site is served, then making WordPress and its content follow. Confirm where TLS ends in your setup, obtain a certificate that lists both the bare domain and www, install it through your control panel or server configuration, and check that the HTTPS address loads before changing anything in WordPress. Then update the WordPress Address and Site Address, fix mixed content, enforce a single HTTP to HTTPS redirect, and test from different devices. Finish by monitoring the expiry date so that renewal never surprises you.
When you are ready to choose a certificate for your site, you can see the available options on the SSL page.
Frequently asked questions
Where do I install the SSL certificate for WordPress?
On the web server or hosting control panel that serves the site, not inside WordPress itself. WordPress only needs to be told to use https addresses once the server presents a valid certificate.
What is mixed content and how do I fix it?
Mixed content happens when an HTTPS page loads images, scripts or styles over plain HTTP. Browsers may block or flag them. Fix it by updating stored URLs to https, correcting theme and plugin settings, and loading external resources over HTTPS.
Should I change the site address before the certificate works?
No. First confirm that https works for the domain, then change the WordPress Address and Site Address. Changing it earlier can lock you out of the dashboard or cause redirect loops.
How do I avoid a redirect loop after enabling HTTPS?
Make sure only one layer forces the redirect and that WordPress can tell the original request was HTTPS. Behind a proxy or CDN, the server may need to read a forwarded protocol header correctly.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need an SSL certificate?
Pick the certificate type that fits your site and see the price before you check out.
SSL from $14.99
See SSL certificatesKeep reading

SSL Guides
How to Choose a TLS Certificate for an API With Many Hostnames
APIs often serve many hostnames across regions, tenants and versions. Learn how to compare single, SAN and wildcard certificates and plan rotation for API clients.
10 min read

SSL Guides
How to Install an SSL Certificate on Nginx
A practical walkthrough for installing an SSL certificate on Nginx, from preparing the files to testing the configuration, redirecting HTTP and verifying the result.
10 min read

SSL Guides
Does a New Subdomain Need a New Wildcard SSL Certificate?
A wildcard certificate covers many subdomains, but not all of them. Learn what it includes, which names need a new certificate, and how to add a subdomain safely.
9 min read