Your Gateway To Digital Success
Wesbytes Blue Logo

Wesbytes Knowledge Base

Search our articles or browse by category below

How to Configure WordPress to Work with a New Domain

Last modified: July 2, 2022
You are here:
Estimated reading time: 1 min

How to Configure WordPress to Work with a New Domain

Using WordPress Admin Dashboard

First, go to Settings > General and replace your WordPress Address and Site Address with your new domain name.

  • The “Site Address (URL)” The address your visitor must provide in their browser to access your WordPress blog is the setting.
  • The “WordPress Address (URL)” setting is the location of the main WordPress files.

Using File Transfer Protocol (FTP)

You can get your site back up and running quickly with wp-config.php and functions.php although you accidentally changed the values incorrectly in the WordPress Dashboard if you have FTP access to the website.

Edit wp-config.php

You can set the URL for your site manually in the wp-config.php file.

Add these lines to your wp-config.php, where “” is the correct location of your site.


Note: Simply hardcoding the data into the website’s source code is not necessarily the best answer. You can no longer modify them on the general settings page when using this technique.

Edit functions.php

  1. Download a copy of the functions.php file for the current theme. You may update it in a basic text editor and upload it again to the website.
  2. Add these lines to the file, right after the initial “<?php” line.
update_option( 'siteurl', '' );
update_option( 'home', '' );

Note: Remember to replace the with your own URL .

3. Re-upload the file to your site in the same location.

4. Load the login or admin page for a few times. The site is supposed to return.

Was this article helpful?
Dislike 0
Views: 6