Change your wordpress website from http to https

Advertisement

To secure your website from http to https protocol, you need ssl certificate for your domain name. There are two ways to get ssl certificate.

  1. Use free ssl certificate provided by “Let’s encrypt”. Bigrock hosting automatically configures these certificates for your website and auto renews them using autoSSL facility.
  2. Buy ssl certificate from paid providers like Comodo SSL.

After installing SSL certificate on your website, you need to make changes to your wordpress blog to make SSL work without any problems.

Editing of WP-Config File

Add following line in wp-config.php file in root of wordpress installation.

Copy paste this line before following line in wp-config.php:

Editing WP-Config for http to https

Editing WP-Config for http to https

Change WordPress and Site URL

Go to dashboard and change wordpress URL and site URL in Settings –> General page.

http to https in settings general of wordpress

http to https in settings general of wordpress

Changing all URLs inside wordpress database

Next you need to change all URL’s pointing to http version of your website to https. Best way to do this is using Velvet Blues wordpress plugin. Take backup of your website before using this plugin. Be very carefull while entering old and new urls. You need to go to Tools->Update URLs in wordpress dashboard.

Velvet Blues Plugin Settings

Velvet Blues Plugin Settings

Updating .htaccess file in website root

Next you need to redirect all http://www.yourdomain.com to https://www.yourdomain.com using an instruction in .htaccess file of your website. You can edit this file by downloading this file using ftp program like filezilla and editing it and uploading it back to site root.