How to move a WordPress site from HTTP to HTTPS (SSL)
To move a WordPress site from HTTP to HTTPS (SSL), use the following steps:
Make a backup of your WordPress site using the Softaculous App Installer in cPanel, and wait for the backup to complete.
Sign in to the WordPress admin dashboard, then visit General Settings and change the WordPress Address and Site Address to both begin with
https://(note the presence of the ‘s’ after ‘http’).Typically, it is best to include the
www.for normal domains, for examplehttps://www.example.com, and omit thewww.for subdomains, for examplehttps://sub.example.com.Select
Plugins > Add Newin the left column.In the search box on the top right, enter
Really Simple SSL.In the box showing the plugin
Really Simple SSL, select Install Now, wait for the installation to complete, then select Activate.Select the Activate SSL button.
If you have the LiteSpeed Cache plugin installed, select
LiteSpeed Cache > Toolboxin the left column, then select Purge All.If you have a different caching plugin installed, use the Purge All function provided by that plugin.
Visit your website with its URL beginning with
https://to see if the website loads fine and correctly shows a locked padlock in the browser address bar.If everything looks okay, you’re all done and there is no need to proceed further!
Visit phpMyAdmin in your hosting account’s cPanel.
Your cPanel access details are listed on the hosting account’s Info page in the Client Lounge.
In the left column, select the name of your WordPress site’s database.
You can find the name of your WordPress site’s database in the wp-config.php file of your website.
Select the SQL tab at the top.
Run the following SQL statements to update instances of
http://found within posts (replace all instances ofexample.combelow with your actual domain):UPDATE wp_commentmeta SET meta_value = REPLACE(meta_value, "http://example.com", "https://www.example.com"); UPDATE wp_commentmeta SET meta_value = REPLACE(meta_value, "http://www.example.com", "https://www.example.com"); UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, "http://example.com", "https://www.example.com"); UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, "http://www.example.com", "https://www.example.com"); UPDATE wp_comments SET comment_content = REPLACE(comment_content, "http://example.com", "https://www.example.com"); UPDATE wp_comments SET comment_content = REPLACE(comment_content, "http://www.example.com", "https://www.example.com"); UPDATE wp_links SET link_description = REPLACE(link_description, "http://example.com", "https://www.example.com"); UPDATE wp_links SET link_description = REPLACE(link_description, "http://www.example.com", "https://www.example.com"); UPDATE wp_links SET link_url = REPLACE(link_url, "http://example.com", "https://www.example.com"); UPDATE wp_links SET link_url = REPLACE(link_url, "http://www.example.com", "https://www.example.com"); UPDATE wp_options SET option_value = REPLACE(option_value, "http://example.com", "https://www.example.com"); UPDATE wp_options SET option_value = REPLACE(option_value, "http://www.example.com", "https://www.example.com"); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, "http://example.com", "https://www.example.com"); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, "http://www.example.com", "https://www.example.com"); UPDATE wp_posts SET guid = REPLACE(guid, "http://example.com", "https://www.example.com"); UPDATE wp_posts SET guid = REPLACE(guid, "http://www.example.com", "https://www.example.com"); UPDATE wp_posts SET pinged = REPLACE(pinged, "http://example.com", "https://www.example.com"); UPDATE wp_posts SET pinged = REPLACE(pinged, "http://www.example.com", "https://www.example.com"); UPDATE wp_posts SET post_content = REPLACE(post_content, "http://example.com", "https://www.example.com"); UPDATE wp_posts SET post_content = REPLACE(post_content, "http://www.example.com", "https://www.example.com"); UPDATE wp_posts SET post_title = REPLACE(post_title, "http://example.com", "https://www.example.com"); UPDATE wp_posts SET post_title = REPLACE(post_title, "http://www.example.com", "https://www.example.com"); UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, "http://example.com", "https://www.example.com"); UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, "http://www.example.com", "https://www.example.com"); UPDATE wp_term_taxonomy SET description = REPLACE(description, "http://example.com", "https://www.example.com"); UPDATE wp_term_taxonomy SET description = REPLACE(description, "http://www.example.com", "https://www.example.com"); UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, "http://example.com", "https://www.example.com"); UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, "http://www.example.com", "https://www.example.com"); UPDATE wp_users SET user_url = REPLACE(user_url, "http://example.com", "https://www.example.com"); UPDATE wp_users SET user_url = REPLACE(user_url, "http://www.example.com", "https://www.example.com");Visit the various pages of your WordPress site via HTTPS to see if they’re loading correctly. If there are still HTTPS errors such as mixed-content errors, there may be embedded elements in your WordPress theme whose URLs have been hard-coded to begin with
http://.To see if this is the case, check the
.phpfiles in thewp-content/themes/[your theme]folder for embedded elements (such as images, CSS, and JavaScript files) that have URLs that are hard-coded to begin withhttp://, and modify them to begin withhttps://instead.
Your WordPress site should now be accessible via HTTPS, and a secure padlock logo should appear in your web browser when you visit your website.
Should you have any questions about making your WordPress site accessible via HTTPS, please feel free to open a Client Care ticket via the Client Lounge.
and Linux friendly!
It’s fast, easy and secure.
From $2.68/mo
We can help you move your
email and websites as desired.