Security and SSL
Enable HTTPS in WordPress with a valid SSL certificate
To use HTTPS in WordPress you need a valid certificate on the server and an application configuration that uses the secure address. Changing a URL in WordPress does not install the certificate.
Before changing the addresses
Check the domain's SSL coverage and test access over HTTPS without warnings. Keep a recoverable backup of the database and configuration, and note down the two current addresses.
This procedure applies to a single installation. For Multisite, installations with URLs fixed in code or websites behind a proxy, first review the specific configuration with whoever manages the website.
Change HTTP to HTTPS
- Log in to the WordPress admin area and open Settings > General.
- Find WordPress Address (URL) and Site Address (URL).
- Replace only
http://withhttps://in both. Keep the domain,wwwand any subdirectory that is already part of each address. - Save the changes. WordPress may ask you to log in again at the HTTPS address.
The two addresses do not have to be identical. For example, the WordPress files may be in a subdirectory and the public page at the root. Not making them match avoids breaking an installation that was already working.
If the fields are disabled, check whether they are defined with WP_HOME and WP_SITEURL in the configuration. Do not add duplicate definitions to force the change.
Redirect visits and review the content
Once the website and admin area work over HTTPS, enable the redirect from HTTP. Also test internal pages, forms and images, and clear the application or CDN caches if they keep the old addresses.
Old HTTP links may still be stored in content, widgets or plugin settings. Find insecure requests with the browser console. For a bulk replacement, use a tool that supports WordPress's serialised data, with a prior backup and a review of the changes; do not run an indiscriminate SQL replace.
If you lose access or a loop appears
Check whether you changed the domain or a path by mistake, and keep the exact message. If there is a proxy or CDN, check how it passes HTTPS on to the origin server. Do not keep adding redirect rules or accept an invalid certificate to get in.
Ask for help, giving the previous addresses and the error. You can also see the official guide to fixing WordPress URLs and how to resolve mixed content.
You may also find useful
- AutoSSL notice: the renewal may reduce coverage Explains the reduction of coverage notice, how to find the domain that fails validation and when to...
- Automatic SSL certificates for domains and subdomains Check AutoSSL's free coverage and enable HTTPS on your website once the certificate is valid.
- Diagnose an invalid SSL certificate Tell apart a wrong name, expiry and the chain of trust; check the DNS destination and the AutoSSL st...
- Enable HTTPS in Joomla Explains how to check the certificate and enable HTTPS from Joomla's global configuration without ne...
Something wrong or out of date? Tell us and we will review it.