> ## Documentation Index
> Fetch the complete documentation index at: https://kb.verpex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changing WordPress Site URL using WP-CLI

> How to Change WordPress URL via WP-CLI

**How to Change WordPress URL via WP-CLI**

Changing WordPress home and site URLs through the admin dashboard is made possible\
using the wp option update command.

To change the home address, run this command:

```text theme={null}
wp option update home ‘http://testing.com’
```

To change the site URL use this command:

```text theme={null}
wp option update siteurl ‘http://testing.com’
```

**How to Update WordPress via WP-CLI**\
To update WordPress files and the database use these commands

Update the WordPress files first:

```text theme={null}
wp core update
```

To confirm if it is necessary to update the database to the required version:

```text theme={null}
wp core update-db
```

Check your WordPress version using this command:

```text theme={null}
wp core version
```
