There may be instances when you need to change your WordPress Home and Site URL such as when you are ready to switch your site to HTTPS:// or if you intend on moving your WordPress site to another Domain or Directory.
In This Guide:
→ Option #1 – Change Home and Site URL From Dashboard
→ Option #2 – Update Home and Site URL via PHPMyAdmin in the Database
→ Option #3 – Update Home and Site URL via the wp-config.php file
In Another Guide:
→ What is the Difference Between the Home and Site URL in WordPress?
Option #1 – Change Home and Site URL From Dashboard
You can change the Home and Site URL from the WordPress Dashboard:
1. Log into Your WordPress Dashboard
2. From the Left Hand Side, Click on: Settings > General
3. Update Your New WordPress Address (URL) and Site Address (URL) then click Save.
→ What is the Difference Between the Home and Site URL in WordPress?
Option #2 – Update Home and Site URL via PHPMyAdmin in the Database
1. Log Into cPanel
2. Backup your database in cPanel before making any changes!
3. Click on the phpMyAdmin icon under the Database section to open phpMyAdmin where you will manage your database.
4.Select your WordPress database from the left to expand it then select your wp_options table.
Your wp_ prefix may differ based on your installation settings.
5. Click Edit beside the siteurl or home option_name. You can also Double Click in the option value to edit the option_value directly.
6. Enter in your new WordPress URL in the option_value field
7. Scroll Down then click Go
That’s it! The WordPress Home and Site URL should now be updated.
Option #3 – Update Home and Site URL via the wp-config.php file.
You can also edit your WordPress address in the wp-config.php file.
This is the best method to use if you’ve moved your WordPress site or need to test it from a temporary URL. Sometimes when moving WordPress sites, Option#1 and Options#2 above do not work.
If that’s the case, this is the method you can use instead.
Important Note! Once you change the Home and Site URL Settings in the wp-config.php file, the ability to modify them from the dashboard is lost! The wp-config.php file settings will supersede the settings in the dashboard.
1. Edit your wp-config.php file.
2. You will see a prompt open, Click Edit on the Prompt to open the wp-config.php file for editing.
3. Define your WP_HOME and WP_SITEURL settings by copying and pasting the lines below into your wp-config.php file replacing ‘example.com’ with your new website URL:
define('WP_HOME','https://example.com'); define('WP_SITEURL','https://example.com');
4. Paste the lines into the file as shown the image above including your new website URL.
5. Click the Save Changes button the top right-hand corner of
File Manager.
That’s it! Browse to your New Website URL in your Browser to check your Changes.
Remember to clear your browser cache!
At GlowFrog changing your WordPress home and site URL is easy! Not a current GlowFrog customer? Sign up for one of our Managed WordPress plans and enjoy a free, fast migration within 24 hours.