To move an existing http site to https
- Make a backup !!!
- Purchase SSL certificate and get hosting provider to install it, test with https://www.ssllabs.com/ssltest/index.html
- In WP general settings, set both urls to https://
- Add to the top of htaccess file in the sites top level (not /wp) folder (and no .htaccess file is needed in /wp):
- # Redirect http to https
- RewriteEngine On
- RewriteBase /
- RewriteCond %{HTTPS} !=on
- RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# Redirect http to https RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] - Look for ‘http:/’ in parent and child themes
- hardcoded http: in DB is OK in <a> links, but not in src= elements. This causes the lack of lock icon on those pages. Bad URL can be in the posts table, post_meta table [custom fields, gravity forms confirmations] and options table [widget settings]. In case useful, here are example queries to find culprit URLs:
- SELECT * FROM `wpress_posts` WHERE `post_content` LIKE '%src="http:/%' AND post_status = "publish"`
SELECT * FROM `wpress_posts` WHERE `post_content` LIKE '%src="http:/%' AND post_status = "publish"`
- SELECT * FROM `wpress_postmeta` WHERE `meta_value` LIKE '%src="http:/%'
SELECT * FROM `wpress_postmeta` WHERE `meta_value` LIKE '%src="http:/%'
Use DB search/replace tool (more) to fix database entries. Ex: settings:
- Test All Pages. Check for grey lock icon next to URL in Safari, and Green lock in Chrome
- ronarons.com
- www.ronarons.com
- http://ronarons.com
- https://ronarons.com
- http://www.ronarons.com
- https://www.ronarons.com
- http://ronarons.com/subpage
- https://ronarons.com/subpage
- test that http:// URLs go to https://
- To inform Google about the change in URL, re-add your WordPress site to Google webmaster tools (but this time with https://) and follow this guide to let Google know about the change of URL.
old URL: http://mfmdomc.org
new URL: https://mfmdomc.org
Check all URLS, but dont check update GUIDs
Use Dry Run feature first.


