Wordpress Basic
How to change wordpress Address URL from HTTP to HTTPS
Photo Credit to CodeToFun
After setting up HTTPS
When you enable HTTPS, your website's WordPress Address (URL)
and Site Address (URL)
will not shift to HTTPS automatically; you must manually change them.
We will learn how to change your website's WordPress Address (URL) and Site Address (URL) from HTTP to HTTPS in this article.
Editing wp-config.php #
Photo Credit to CodeToFun
Note: We will use an EC2 instance as an example. However, it is identical to the majority of hosting service providers such as GoDaddy, HostGator, Bluehost, and others.
To make changes to your wp-config.php file. Please follow the procedures below.
- Using FileZilla, connect to your EC2 instance.
- Find the wp-config.php file in your root directory, which is most likely in the subfolder
/bitnami/wordpress
. - Open the wp-config.php in your favorite Text Editor.
- Find the below line
wp-config.phpCopied
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/' ); define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
- Replace http with https
wp-config.phpCopied
define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' ); define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
- Now, upload the edited wp-config.php file back to the server.
Congratulation
The WordPress Address (URL) and Site Address (URL) of your website have now been switched from HTTP to HTTPS.
Photo Credit to CodeToFun
👨💻 Join our Community:
Author
For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.
Buy me a coffee to make codetofun.com free for everyone.
Buy me a Coffee
If you have any doubts regarding this article (How to change wordpress Address URL from HTTP to HTTPS), please comment here. I will help you immediately.