Front-end Tutorials

Front-end Tutorials

HTMLCSSSassJavaScriptReactJS
CMS Tutorials

CMS Tutorials

WordPress
Tutorials expand

How to change wordpress Address URL from HTTP to HTTPS

Updated on Feb 05, 2024
By Mari Selvan
👁️ 478 - Views
⏳ 4 mins
💬 1 Comment
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 #

copy to clipboard

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.

  1. Using FileZilla, connect to your EC2 instance.
  2. Find the wp-config.php file in your root directory, which is most likely in the subfolder /bitnami/wordpress.
  3. Open the wp-config.php in your favorite Text Editor.
  4. Find the below line
    wp-config.php
    Copied
    copy to clipboard
    define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
    define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
    
  5. Replace http with https
    wp-config.php
    Copied
    copy to clipboard
    define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
    define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
    
  6. 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.

copy to clipboard

Photo Credit to CodeToFun

👨‍💻 Join our Community:

To get interesting news and instant updates on Front-End, Back-End, CMS and other Frameworks. Please Join the Telegram Channel:

Author

author
👋 Hey, I'm Mari Selvan

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

Share Your Findings to All

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mari Selvan
Mari Selvan
2 months ago

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.

We make use of cookies to improve our user experience. By using this website, you agree with our Cookies Policy
AgreeCookie Policy