1. Home
  2. WordPress
  3. Changing WordPress URL and Home URL

Changing WordPress URL and Home URL

Changing WordPress URL and home URL is fairly simple, but there are three quite different methods to do it. Below, we’ll take a closer look at how to change URLs in each version.

1. 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 SettingsGeneral 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.fi” with the alias domain name.

Changing WordPress URL and home URL in WordPress admin panel.

2. Changing URL 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.

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

To change the URL,  open the wp-config.php file (right click and Edit).

Changing WordPress URL and home URL in database.

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.

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 HERE

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


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

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).

Changing WordPress URL requires logging in phpMyAdmin panel, where 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).
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.


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.

3. Changing URL via the wp-config.php file

Changing WordPress URL and Home URL is also possible via modifying URL-s in wp-config.php file.

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

Changing WordPress URL and home URL in wp-config.php file.

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

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

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

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

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

Updated on 13. Jan 2025
Was this article helpful?

Related Articles