How to Change Your WordPress Site's Domain Print

  • 0

If you're moving a WordPress site to a new domain, or from a staging address to your real domain, you need to update WordPress's address settings.

Before You Start

Step 1: Change the Site Address

  1. In WordPress, go to Settings > General
  2. Change WordPress Address (URL) and Site Address (URL) to the new address, for example https://newdomain.com.au
  3. Click Save Changes

You'll be logged out. Log back in at the new address.

Step 2: Update Links Inside Your Content

Your pages and images still contain the old address. A plugin like Better Search Replace fixes this:

  1. Install and activate Better Search Replace
  2. Go to Tools > Better Search Replace
  3. Search for https://olddomain.com.au and replace with https://newdomain.com.au
  4. Select all tables
  5. Run it first with Run as dry run? ticked to see how many changes it will make, then untick it and run again

Step 3: Redirect the Old Domain

So visitors and Google follow you to the new address, set up a 301 redirect from the old domain to the new one. See How to Redirect a Page or Domain.

Locked Out After Changing It?

If you typed the address wrong and can't log in, open wp-config.php in File Manager and add these two lines above "That's all, stop editing!":

define('WP_HOME', 'https://correctdomain.com.au'); define('WP_SITEURL', 'https://correctdomain.com.au');

Log in, fix the settings, then remove the two lines.


Was this answer helpful?

« Back