How To Easily Migrate WordPress Blog To HTTPS Connection

Migrate WordPress blog to HTTPS

Either you’ve been blogging for long time or just a beginner, you would definitely have noticed a green pad lock in the address bar for sites that contain HTTPS in their URL. This is the secured version of HTTP (Hypertext Transfer Protocol) which ensures that the information submitted to website by its visitors will reach to destination securely.

So, this HTTPS connection is essentially being used by sites that ask visitors to submit some sorts of information like credit card details, any personal information etc. But, this time it seems that Google wants every site to run on HTTPS connection as it started showing a “Not Secure” warning in Chrome browser from its 68th update for the sites that use HTTP connection.

In case, you’re just starting a new blog, it’s truly very easy to set it up on HTTPS connection from the first day, but when it comes to migrate an existing WordPress blog from HTTP to HTTPS connection, things might be bit difficult and even sometimes frustrating, only if you’re not careful enough.

Here’s How to Migrate WordPress Blog to HTTPS Connection

Let me guide you step by step to easily migrate your WordPress blog or website to HTTPS connection without affecting the SEO and traffic of your site.

Step 1: Install SSL Certificate on Your Server

Once you’ve the SSL certificate installed on your website, your website will start opening with https protocol. For this to happen, you need to get an SSL certificate to install it on hosting server.

But, for your information let me tell you that most web hosts offer a free SSL with their hosting packages. So, before you buy the one, you should ensure with your hosting provider about the same and ask them to install the one on the server of your WordPress blog.

After installing the SSL certificate on your hosting server, your WordPress blog will start opening with HTTPS protocol. But, it’s not the end. The most important is till remaining. Let’s move on to the next step.

Step 2: Replace All URLs on Your Blog to HTTPS

As you’re migrating your already-running WordPress blog from HTTP to HTTPS, it’s very important for you to replace all the existing URLs from HTTP to HTTPS.

This is because the certificate will just activate the HTTPS protocol on your blog that means if someone visits your site with https, it will show a padlock at the address bar but if any of your blog’s ready click on the existing non-https URL or visit the website via HTTP protocol, then the unsecured version of the blog will be rendered.

That’s why, after installing certificate you should immediately replace all your blog’s URLs to HTTPS. As it’s not that easy to replace each URL on your site with HTTPS one by one, so you may use a WordPress plugin called Better Search Replace to bulk replace all the HTTP URLs to HTTPS at once.

Better Search Replace WordPress Plugin

In this plugin, you’re just required to enter the http URL of your WordPress blog in Search field and https version of the blog’s URL in Replace field. As soon as you hit the Run button, the plugin will replace all the http entries into https in your WordPress blog.

Disclaimer: I’m neither the developer/owner of this plugin nor responsible for any failure. However, it worked like a charm for me and so I’m referring it here.

Step 3: Add HTTP to HTTPS 301 Redirect For All URLs

It’s not just enough to replace all the URLs on your blog to HTTPS because by doing so you will just protect users of your blog to click on a non-https URL but if someone types http version of your blog URL or just something like example.com, then the unsecured version of your website will open.

This is why you’re required to redirect all the HTTP requests on your blog to HTTPS permanently using the 301 permanent redirect method.

If you use the Really Simple SSL plugin, there’s no need to add 301 redirects as it does automatically. But, if you’re not using the plugin and want to do it manually (which is recommended), you can do it at server level.

If you’re using Negix server, add the following code to your Negix config.

server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://domain.com$request_uri;
}

For Apache server, you need to add the following code to your .htaccessfile.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Don’t worry if you’re not sure how to do that in your server. Just ask your web hosting support to do it on your behalf. Once, all the URLs are permanently redirected to HTTPS, you’re done.

Final Recommendations

However, installing SSL certificate, replacing all the hard-coded links to HTTPS and setting up a 301 HTTP to HTTPS redirect is enough for successfully migrating your WordPress blog to HTTPS but still there’re some other important steps that you should never forget.

I mean, you should now add a new HTTPS property to Google Search Console and set the HTTPS version of your blog as preferred. After that resubmit the sitemap the new HTTPS property so that Google starts crawling the HTTPS URLs from your blog.

And then if you’re using Google Analytics, replace the property and website URL with HTTPS for the exact real-time analytics of your blog’s traffic.

That’s I believe very enough to completely migrate your WordPress blog to HTTPS connection. And if all the steps and recommended suggestions will be followed correctly, there’s no chance of losing your existing traffic.

READ NEXT: The Most Affordable Managed WordPress Hosting

Leave a Reply