Despite applying 'SSL' to WordPress and completely remodeling it with the 'https' site, when I insert an image into a post within the post, such as 'Media → Library → Copy Link,' , Permalink) is sometimes set to 'http'.
In this case, if you forgot to insert 'http' and you've set all the 'SSL' security settings, your browser will recognize it as an 'incomplete secure connection page'. So you must change the first part to 'https', but it's not annoying to do this every time.
However, by modifying the WordPress 'wp-config.php' file, it is very simple and automatically recognized as 'https' and can be changed to enter. Let's change it right away.
How to change your WordPress media and preferred URL from 'http' to 'https'
- Use a 'FTP' program such as Filezilla to go to a 'htdocs' path, such as '/ opt / bitnami / apps / wordpress / htdocs', based on 'AWS WordPress'.
- Find 'wp-config.php' file and click 'right click' → 'View / Edit (V)'. (Download, edit and upload)
- Find the following part of 'wp-config.php' document and modify it as follows.
- Change the 'http' part of the red part to 'https' like the blue part below.
- When editing through 'right click' → 'View / Edit (V)', pressing 'Ctrl + S' or 'save' will prompt you to apply the modifications in Filezilla. Is complete.
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/'); define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');
Once this is set once, the default site setting will be recognized as 'https' in the future, and naturally 'URL (permalink, image address)' will be entered as 'https' even when inserting images such as media. .