# Moving WordPress to a different domain in 5 steps without downtime

> Move your WordPress site from a subdirectory or a different domain to its new home in five straightforward steps, with no downtime.

Source: https://www.kualo.com/knowledgebase/wp-security/moving-wordpress-to-different-domain-in-5-simple-steps-without-any-downtime
Updated: 2026-06-09

---

This guide walks you through moving a WordPress site from a subdirectory (e.g. `http://domain1.com/wp/`) to the root domain (`http://domain1.com/`), or from one domain to another entirely. The procedure is the same in both cases.

You will need access to your [cPanel account](/knowledgebase/cpanel-how-tos/how-to-login-to-cpanel) and your WordPress dashboard.

:::info
Throughout this guide, replace `http://domain1.com/wp/` and `http://domain1.com/` with your actual source and destination URLs.
:::

![WordPress site running at domain1.com/wp/](https://kb-cdn.kualo.com/b5/64/b5642bbd123cf61abc497f471346dcc7ce220adf.png)

## Step 1: update the WordPress address and site URL

Log in to your WordPress dashboard, go to **Settings > General**, and update both fields:

- **WordPress Address (URL):** `http://domain1.com`
- **Site Address (URL):** `http://domain1.com`

Click **Save Changes**.

![WordPress General Settings showing URL fields](https://kb-cdn.kualo.com/40/83/4083639a08bba59d52004f6e1a4bd54147760efe.png)

## Step 2: open the document root in cPanel File Manager

[Log in to cPanel](/knowledgebase/cpanel-how-tos/how-to-login-to-cpanel) and open **File Manager**. Navigate to the document root of `domain1.com`.

:::tip
Make sure **Show Hidden Files** is enabled in File Manager settings so that files such as `.htaccess` are visible.
:::

![cPanel File Manager showing document root](https://kb-cdn.kualo.com/19/37/19377f52ed8adfd94652d0e37285fc5189e53312.png)

## Step 3: copy the WordPress files to the document root

Open the `/wp/` folder, select all files and folders, then copy them to the document root of `domain1.com`.

![File Manager copy dialog](https://kb-cdn.kualo.com/41/a6/41a6cb0e5b903a44bd274a05c1bc5c67a118bb2f.png)

## Step 4: search and replace the old URL in the database

Install the free [Better Search Replace](https://wordpress.org/plugins/better-search-replace/) plugin from the WordPress plugin directory, then activate it.

![Better Search Replace plugin in the WordPress plugin directory](https://kb-cdn.kualo.com/a4/e5/a4e5798ff0d70effa109155fcedc2603988f8f18.png)

Go to **Tools > Better Search Replace** and fill in the fields as follows:

| Field | Value |
|---|---|
| Search for | `http://domain1.com/wp` |
| Replace with | `http://domain1.com` |
| Select tables | Select all tables |

To select all tables, click the first table, then hold **Shift** and click the last one. On Windows you can also use **Ctrl+click**; on Mac use **Cmd+click**.

Run a **dry run** first to preview the changes, then click **Run Search/Replace** to apply them.

![Better Search Replace settings screen](https://kb-cdn.kualo.com/3c/3b/3c3b97b1c26e07f7f7b405cc0d78afd7bb11dafe.png)

## Step 5: set up a 301 redirect from the old URL

In cPanel, create a 301 redirect from `http://domain1.com/wp/` to `http://domain1.com/`. See [how to set up domain redirects in cPanel](/knowledgebase/cpanel-how-tos/how-to-setup-domain-redirects-in-cpanel) for full instructions.

![cPanel Redirects screen](https://kb-cdn.kualo.com/5f/ed/5fedba4767cc28bfcb036b5ae7de29581d5318c4.png)

:::info
If you are moving from a directory other than `/wp/`, you can use a **wildcard redirect** to forward all files in the old directory to the same filename at the new location. This option does not work when moving from a subdirectory to the root (e.g. `/wp/` to `/`).
:::

## Cleaning up

Once you have confirmed the move was successful and everything is working correctly, delete the old `/wp/` folder from your document root in cPanel File Manager.

If you need further help, open a support ticket from within your Kualo client area.

---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/wp-security/moving-wordpress-to-different-domain-in-5-simple-steps-without-any-downtime · © Kualo Ltd._
