---
title: "Changing WordPress Site URL and Home URL"
canonical_url: "https://www.zone.lv/help/kb/changing-wordpress-site-url-and-home-url/"
post_type: "ht_kb"
published: "2025-01-10T08:11:51+00:00"
modified: "2026-02-13T09:59:33+00:00"
language: "en"
author: "Tanel"
taxonomies:
  ht_kb_category:
    - name: "Wordpress"
      url: "https://www.zone.lv/help/kb-categories/wordpress-en/"
  ht_kb_tag:
    - name: "home url"
      url: "https://www.zone.lv/help/kb-tags/home-url/"
    - name: "siteurl"
      url: "https://www.zone.lv/help/kb-tags/siteurl/"
    - name: "WordPress Site URL"
      url: "https://www.zone.lv/help/kb-tags/wordpress-site-url/"
    - name: "WordpressHome URL"
      url: "https://www.zone.lv/help/kb-tags/wordpresshome-url/"
---

# Changing WordPress Site URL and Home URL

## 1 Method: Changing from the WordPress admin panel

In order to change your WordPress Site URL and Home URLs, first log in to the WordPress admin panel and navigate to `Settings` → `General Settings`. On the `General Settings` page, enter the new addresses in both the `WordPress Address (URL)` and `Site Address (URL)` fields and click `Save Changes` at the bottom of the page.

 Setting up an alias domain If you have an alias domain connected to your virtual server and you want the website to use the alias domain as its main domain, replace “yourdomain.ee” with the alias domain name.

[![Changing Site URL and Home URL](https://www.zone.lv/static/sites/5/Changing-Site-URL-and-Home-URL.png)](https://www.zone.lv/help/en/kb/changing-wordpress-site-url-and-home-url/changing-site-url-and-home-url/)

## 2 Method: Changing via the database

### Database user credentials

First of all, you need to find database username and password, which you can use to access the database.

Login to My Zone control panel and click on the shortcut `Files` under `Web and E-mail`.

[![Webhosting, file management](https://www.zone.lv/static/sites/5/ENG-301-redirection.png)](https://www.zone.lv/help/en/kb/301-redirect-with-htaccess-file/eng-301-redirection/)

Open the directory where the WordPress page is installed (if the page is installed on the main domain, it is `htdocs` by default).

[![](https://www.zone.lv/static/sites/5/WEBFTP1-e1675067502530.png)](https://www.zone.lv/help/kb/301-suunamine-htaccessiga/webftp1/)

Then open the `wp-config.php` file (right click and `Edit`).

[![](https://www.zone.lv/static/sites/5/WP_comfig_PHP_EDIT-e1675067540311.png)](https://www.zone.lv/help/kb/wordpressi-url-i-vahetamine-ajutise-aadressi-vastu/wp_comfig_php_edit/)

You can find the database username and password between the `define()` function, next to `DB_USER` and `DB_PASSWORD` respectively, separated by commas and quotes.

Copy them to a separate temporary text file so that they are immediately available.

[![](https://www.zone.lv/static/sites/5/database_password.png)](https://www.zone.lv/help/en/kb/changing-wordpress-site-url-and-home-url/database_password/)

### Logging in to database

The easiest way to connect to the database is to do it through the phpMyAdmin control panel.

If you still have the My Zone control panel open on a separate tab, you can access the phpMyAdmin by choosing `Databases` from the left menu in the server management and then `phpMyAdmin`.

If you managed to close My Zone already, the direct link to phpMyAdmin is: https://pma.ams01.zone.eu/

When going from the direct link, first enter your domain name without the www prefix (e.g. domain.ee) and press `Go`.

[![logging into phpMyAdmin](https://www.zone.lv/static/sites/5/ENG-logging-into-phpMyAdmin1.png)](https://www.zone.lv/help/en/kb/changing-your-wordpress-url-to-a-temporary-address/eng-logging-into-phpmyadmin1/)

On the next screen, enter the database (MySQL) username and password that you copied from the `wp-config.php` file.

[![logging into phpMyAdmin](https://www.zone.lv/static/sites/5/ENG-logging-into-phpMyAdmin2.png)](https://www.zone.lv/help/en/kb/changing-your-wordpress-url-to-a-temporary-address/eng-logging-into-phpmyadmin2/)

### Changing WordPress URL

In the phpMyAdmin panel, click on the database name in the left block, then select `wp_options` in the opened option (instead of wp, table may also have a different prefix).

[![](https://www.zone.lv/static/sites/5/wordpress_wp_url6-170x300.png)](https://www.zone.lv/help/en/kb/changing-wordpress-site-url-and-home-url/wordpress_wp_url6/)

Find the `siteurl` line and double-click the URL that is currently its value. Replace it with new URL and press `Enter` on your keyboard.

Do the same on the line with `home`.

[![](https://www.zone.lv/static/sites/5/ENG-logging-into-phpMyAdmin3-1.png)](https://www.zone.lv/help/kb/changing-wordpress-site-url-and-home-url/eng-logging-into-phpmyadmin3-2/)

The server’s temporary address is formed accordingly: http://yourdomain-eu.vserver.zonevs.eu (In this example [http://yourdomain-eu.vserver.zonevs.eu](http://sinudomeen-ee.vserver.zonevs.eu "http://sinudomeen-ee.vserver.zonevs.eu"))
After changing the `siteurl` and `home` addresses, you may also need to clear the cache of the website, this can be done by pressing `CTRL + SHIFT + DELETE`.

 Attention! When you are ready to finally publish the website and point the domain to the server associated with the page, don’t forget to change the temporary URL address of the WordPress back to the correct one!

## 3 Method: changing via the wp-config.php file

First you need to change the `wp-config.php` file.

Login to My Zone control panel and click on the shortcut `Files` under `Web and E-mail`.

[![Webhosting, file management](https://www.zone.lv/static/sites/5/ENG-301-redirection.png)](https://www.zone.lv/help/en/kb/301-redirect-with-htaccess-file/eng-301-redirection/)

Open the directory where the WordPress page is installed (if the page is installed on the main domain, it is `htdocs` by default).

[![](https://www.zone.lv/static/sites/5/WEBFTP1-e1675067502530.png)](https://www.zone.lv/help/kb/301-suunamine-htaccessiga/webftp1/)

Then open the `wp-config.php` file (right click and `Edit`).

[![](https://www.zone.lv/static/sites/5/WP_config.png)](https://www.zone.lv/help/en/kb/changing-wordpress-site-url-and-home-url/wp_config/)
In the `wp-config.php` file, look for the line “**Add any custom values between this line and the “stop editing” line.”**. After this line, enter the following configuration:

```
define( 'WP_HOME', 'https://yourdomain.com/' );
define( 'WP_SITEURL', 'https://yourdomain.com/' );
```

[![Changing siteurl](https://www.zone.lv/static/sites/5/ENG-changing-siteurl.png)](https://www.zone.lv/help/en/kb/changing-wordpress-site-url-and-home-url/eng-changing-siteurl/)

Save the changes and the website will open from the new address.

 After the change, you may need to clear the website cache and the browser cache.
