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.
thank you for wonderful information
ReplyDeleteNo problem, sir.
Delete