Set Up WordPress To Use SSL¶
Start here when a WordPress site has a working SSL certificate but still needs to use HTTPS consistently. Use cPanel and wp-toolkit first; manual URL changes and search-replace work should be secondary.
Before You Start¶
- Create a backup.
- Confirm you can sign in to WordPress admin.
- Confirm
https://example.comloads without a certificate warning. - Plan time to test forms, checkout, login, and admin after the change.
Large or complex sites need more care
Ecommerce, membership, multilingual, and heavily cached sites can need extra testing. Use a staging copy or contact Fused if the site is business critical.
Preferred Option 1: Force HTTPS In cPanel¶
Start with the cPanel redirect when the certificate already works.
- Log in to cPanel.
- Open
Domains. - Find the WordPress domain.
- Turn on
Force HTTPS Redirect. - Open
http://example.comin a private browser window. - Confirm it redirects to
https://example.com.
This avoids editing .htaccess manually and is usually the safest first redirect
option.
Preferred Option 2: Use wp-toolkit¶
If wp-toolkit is available, use its SSL/HTTPS options before installing a redirect plugin or editing the database manually.
- Log in to cPanel.
- Open
wp-toolkit. - Select the affected WordPress installation.
- Look for SSL, HTTPS, or security options for that site.
- Enable the wp-toolkit option that configures WordPress to use HTTPS, if available.
- Test the public site and WordPress admin.
Secondary Option: Update WordPress URLs¶
Use this if wp-toolkit does not expose the HTTPS setting or WordPress still stores
the old http:// URL.
- Sign in to WordPress admin.
- Open
Settings>General. - Change
WordPress Address (URL)fromhttp://tohttps://. - Change
Site Address (URL)fromhttp://tohttps://. - Save the change.
WordPress may sign you out after saving. Sign back in using the https://
version of /wp-admin/.
WP-CLI Equivalent: Update URLs¶
Run these commands from the WordPress document root when changing the stored site URLs from SSH.
wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'
Secondary Option: Replace Old HTTP References¶
Some themes, plugins, and page builders store full URLs in the database. If the
site still loads images, scripts, or links over http://, run a careful
search-and-replace.
- Create or confirm a fresh backup.
- Use a reputable search-and-replace plugin, wp-toolkit option, or WP-CLI from SSH.
- Search for the exact old URL, such as
http://example.com. - Replace it with the exact new URL, such as
https://example.com. - Run a dry run first if the tool supports it.
- Apply the replacement.
- Remove any temporary search-and-replace plugin when finished.
From SSH, WP-CLI can run the same replacement:
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --dry-run
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid
Match the exact URL
http://example.com, http://www.example.com, and
http://example.com/blog are different values. Replace the exact version
the site used before.
Test The Site¶
Check:
- Home page and key pages.
- Images, CSS, and JavaScript.
- WordPress admin.
- Contact forms.
- Checkout, memberships, or logins.
- Browser address bar for mixed-content warnings.
http://redirects tohttps://.
If the site redirects incorrectly or admin access breaks, contact Fused before making more URL changes.
Related Guides¶
-
wp-toolkit
-
Backups
-
SSL certificates