Wordpress Showing Insecure Icon in Address Bar When Using https

Wordpress Site Shows Insecure Icon in Browser Address Bar When Using https

Here's a common scenario: you build a new wordpress site, and then decide to turn on https after it's fully built, as a result some of your image assets are still referenced with http vs https.  Chrome and Firefox will show "insecure" when they are loaded.  This is how to change that broken lock symbol to a closed lock symbol.

How to Fix

There are add-ons that will try to fix this or you can use URL re-writing, or you could edit the SQL database records and change all http to https.  My preferred method is to dump the WP_POSTMETA and WP_POSTS tables from the Wordpress SQL database, then edit the dump files with vim, then load them back in.

The Easy Way

Open wp-config.php with an editor such as VIM. Change these lines:


Change the http to https to force https mode.

The Hard Way - Dump The Tables

Dump the Tables

The dump Files
Using VIM to edit
Use this VIM command
Import them now using source command in mysql

Summary

SSH into your server, then dump the tables, then use vim to search and replace all http:// with https://, then save the file and import the tables back into mysql.



Comments

Post a Comment

Popular posts from this blog

Microsoft Visio 2010 Premium Product Keys

Mercedes Benz Diesel CDI EGR Emulator Circuit Diagrams

Fix: The Diagnostic Service Host service failed to start due to the following error. [ solved, no kidding ]