Muzafar Khan
Muzafar Khan

Reputation: 827

What are the steps i need to take while changing from http to https my Wordpress site

I need to change my whole site working on https instead http.I have changed http part of WordPress Address (URL) and Site Address (URL) to https from Settings->General but the whole site is down. What steps i need to perform to convert wordpress site from http to https. I have CentOS release 6.3 (Final) installed.

Upvotes: 0

Views: 44

Answers (2)

Girijesh Kumar
Girijesh Kumar

Reputation: 126

To make a website HTTPS, firstly get an SSL certificate for the domain, install it on the server and change the website permalinks from http to https.

Admin Setting:

  1. Go to the admin dashboard.
  2. Point you mouse over Settings and click General.
  3. Where it says WordPress Address (URL) and Site Address (URL) replace the http:// part with https:// for both of them.
  4. Click Save Changes

To easily enable (and enforce) WordPress administration over SSL, the constant FORCE_SSL_ADMIN should be set to true in your site's wp-config.php file to force all logins and all admin sessions to happen over SSL.

define('FORCE_SSL_ADMIN', true);

To setup a 301 permanent redirect, FTP/SFTP to your server and add the code below at the top of WordPress' .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301,NC]

Change every instance of yoursite.com to your WordPress URL.

To inform Google about the change in URL, re-add your WordPress site to Google webmaster tool (but this time with https://).

Hope it will help.

Upvotes: 3

Mangesh Sathe
Mangesh Sathe

Reputation: 2177

What Techie Code said is correct...

Also Don't mention HTTP or HTTPS in your image path. Just keep it like //yoursite.com/img/image.jpg so it will keep track of http or https automatically. This is called as Protocol Relative URL's.

Check here The Protocol-relative URL http://www.paulirish.com/2010/the-protocol-relative-url/

Upvotes: 1

Related Questions