How to move WordPress from HTTP to HTTPs

HTTP refers to the standard protocol used for data communication on the Internet.

HTTP stands for HyperText Transfer Protocol. In the case of HTTPs, the “s” stands for (Secured), which refers to the secured version of HTTP.

If your WordPress website deals with sensitive information, such as logins and credit card details, you should configure HTTPs for increasing your site trust, SEO, and security.

At the moment, however, if your site runs on simple HTTP, you can move your WordPress from HTTP to HTTPs.

In this article today, we learn how to move your WordPress site from HTTP to HTTPs.

Move WordPress website from HTTP to HTTPs

STEP 1: Backup your site FIRST

Before you proceed, it’s important to backup your WordPress website.

Backup helps you restore your WordPress website, in case you failed to set things properly.

As a newbie user, you can easily backup your WordPress site with plugins, such as Up Draft Plus. After you install the said plugin, a single click helps you back up your site and helps you download the backup packages to your computer. For more information on plugins, this list outlines the best WordPress plugins for website owners.

http to https wordpress

Also, read more about backing up your WordPress website, head over to read this tutorial on WpCrib.

STEP 2: Get your SSL certificate

You may find your host supporting free SSL for you. In this case, you don’t have to go through purchasing or acquiring SSL from third party sources.

All you have to do is to log into your hosting cPanel and turn the Free SSL option ON.

If you’re not sure about your host, check your host in this list of companies that support Free SSL for users.

In Hosting cPanel, a single click will turn the required option ON. Conversely, you can contact your hosting customer support and ask them to help you cross the road.

Once you get the SSL, you can install the Really Simple SSL plugin for setting up things on your WordPress website. Proceed to install the said plugin, and click on the Settings -> SSL after activation.

The Really Simple SSL plugin automatically detects SSL on your site and proceeds to use HTTPs on your WordPress website.

move wordpress

If you don’t prefer going through technical routines, you can follow the steps described above. Get your SSL certificate (ask your Hosting customer support to activate it for you), and proceed to install the Really Simple SSL plugin for setting up SSL/HTTPs on your WordPress website.

However, the following steps help you move WordPress from HTTP to HTTPs – manually.

STEP 3: Set HTTPs for the WordPress admin area

If you’ve decided to proceed with the manual method, read on to set HTTPs on the WordPress admin area.

Now you’ve got your SSL certificate, you need to alter wp-config.php file of your WordPress website.

move wordpress wpcrib

Open the wp-config.php file with a code editor, say Notepad++ for Windows. Locate the line that says “That’s all, stop editing”, and place the following line somewhere above the said line.

define(‘FORCE_SSL_ADMIN’, true);

After you save changes, browse to your site’s login page (site.com/wp-login.php). If you see the page has loaded with HTTPs, it’s time to proceed to the next step.

STEP 4: Update your WordPress site URL

The next step consists of adding HTTPs to your site address.

To get started, land on the Settings -> General page and add HTTPs to both URLs.

move wordpress wpcrib

After you save changes, you may face logging out of the WordPress dashboard. You can sign in back as you normally do.

STEP 5: Change URLs in the Content and Theme files

As you’ve changed settings for the admin and dashboard, there may be links in the content and theme files that need to be changed.

Having said that, if your site files contain links with HTTP, it will show a “Mixed Content Error” in the browser. Also, the browser wouldn’t show a secure padlock symbol for your site.

To solve this issue, you’ll need to find content/database links with HTTP, and replace them with HTTPs.

Head over to Add New Plugin page and install Better Search Replace WordPress plugin for the said purpose. For more information on how to use the said plugin, this tutorial helps you finish the entire process as a beginner.

move wordpress wpcrib

Similarly, you’ll need to search your theme files for links with HTTP and replace them with HTTPs. In the same manner, for HTTP links in plugin files, contact the plugin author for covering technical routines.

If for some reasons, you still see the Mixed Content Errors on your site, you can move WordPress from HTTP to HTTPs with the Really Simple SSL plugin and avoid the manual routines.

STEP 6: Configure redirects in .htaccess file

The .htaccess file exists inside the root folder of your WordPress. It contains settings for using permalink structures.

http to https

To configure redirects in a .htaccess file, proceed to log into your Hosting cPanel -> File Manager.

If you couldn’t find the .htaccess file there, make sure you turn the “show hidden files” option ON.

Once opened the said file, place the following code at the top and save changes.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

From now on, the browser will redirect your site’s visitors to the HTTPs version of your website.

STEP 7: Test your SSL/HTTPs settings

You’ve completed the routine for setting up SSL/HTTPs on your WordPress website.

Proceed to land on the SSL Test website and put in your site address. The tool helps you test your SSL settings on your site and gives an overall rating of how well you’ve implemented SSL on your website.

move wordpress from http to https

In the same manner, SSL Check helps you find any errors regarding SSL. Make sure you check your site with SSL Check as well.

move wordpress from http to https

STEP 8: Change essential settings for your site

The final step consists of changing your site’s assets and essential settings.

  1. Update your sitemap. If you use the Yoast SEO plugin, it usually updates sitemap automatically. Also, update your sitemap link in the robots.txt file.
  2. Add a new property in Google Search Console account. Make sure you add a new property with HTTPs version of your website.
  3. If you have implemented CDN for your website, update links there as well.
  4. Don’t forget to change your site URL in Google Analytics.
  5. Update your social media links in the Yoast SEO settings.

If you face the Mixed Content Errors after implementing SSL/HTTPs, head over to this tutorial on how to fix the mixed content errors on a WordPress website.

Wrapping up

The process of moving your site from HTTP to HTTPs consists of technical steps. If you don’t prefer hard things; however, you can use the Really Simple SSL plugin for the job.

Whatever the path you take, you can also consult your Hosting customer support and ask them to configure SSL on your site.

You may also find your Hosting company lacking support for the Free SSL. If that is the case with you, you will need to get an SSL certificate from a third party service like SSLS.

Keep in mind that, before you start implementing SSL on your website, you should take a backup of your site. Similarly, don’t forget to change essential settings after you have finished implementing SSL on your site.

Needless to say, in the end, test your site with SSL Test and SSL Check to find any leftovers regarding SSL on your WordPress website. Once you see a green signal, you can proceed to go live with the new version of your WordPress website.

Did you find this tutorial helpful? If you still face any problems, let us know by joining the conversation in the comments.

More on wpcrib

Add comment

Join discussion and make an impact. Your email address will not be published.

GDPR is going into effect on May 25, 2018. Learn more in our new GDPR section. You can also view changes to our Privacy Policy.
We use cookies to provide a personalised experience for our users.