Updating WordPress URLs After Moving or Cloning a Website Print

  • WordPress, change URL, Update domain name
  • 0

When a WordPress website is moved or cloned to a new hosting account or domain name, it may still contain links pointing to the old domain. This can cause problems with images, internal links, and site loading.

Follow the steps below to update the website address settings in WordPress.

Step 1: Log in to WordPress

Open your web browser and go to your WordPress admin login page:

https://yourdomain.com/wp-admin

Enter your WordPress username and password to log in.

Step 2: Open the General Settings Page

Once you are logged in to the WordPress dashboard:

  1. Click Settings in the left-hand menu
  2. Click General

Step 3: Update the Website URL Settings

On the General Settings page, you will see these two fields:

  • WordPress Address (URL)
  • Site Address (URL)

Update both fields so they use your new domain name.

Example:

Old domain: https://oldsite.com
New domain: https://newsite.com

Make sure both URL fields are changed to the new domain.

Step 4: Save the Changes

Scroll to the bottom of the page and click Save Changes.

After saving, WordPress may log you out automatically. If this happens, simply log in again using the new domain name.

Step 5: Check Images and Internal Links

In some cases, images, buttons, or internal links may still point to the old domain. This happens because those links may still be stored in the database.

If this occurs, a search and replace tool may be needed to update old links to the new domain.

One commonly used plugin is:

  • Better Search Replace

This can be used to replace all old domain references with the new one.

Example replacement:

oldsite.com → newsite.com

This helps ensure that:

  • Images load correctly
  • Internal links point to the correct domain
  • Stylesheets and scripts load properly

Summary

  1. Log in to WordPress at /wp-admin
  2. Go to Settings > General
  3. Update both URL fields to the new domain
  4. Save the changes
  5. Run a search and replace if old image or link paths still appear

If you are unable to access the WordPress dashboard after a migration, the site URLs may need to be updated directly in the database using phpMyAdmin.


Was this answer helpful?

« Back