Change domain of a WordPress website

If you want to change the address of a WordPress website, it is not enough to do this via my.cyon. WordPress always refers to the domain that is stored within WordPress. The stored URL determines what is displayed in the browser as the address of the website. In this article we will show you how the change works and what you have to consider.

Video tutorial to change domain in WordPress 1

Make sure the new domain is set up on the web hosting. It must point to the same folder as the old domain. You can check this in my.cyon under «Webhosting» > «Domains». See also the article «Location of my website».

If the new domain has not yet been set up, our article «Setting up a domain on web hosting» offers support. 2

Log into the backend of the WordPress site and go to the «Settings» menu.

If you cannot get to the WordPress backend, you can store the domain directly in the wp-config.php file according to «Alternative variant». The article «Login to the WordPress backend is not possible» is also helpful. 3 Change the value of the two fields «WordPress address (URL)» and «Website address (URL)» to the new domain. Replace the old domain (in our example through the new domain.

Changing the domain in the WordPress backend WordPress does not support umlaut domains. If you want to use a domain with umlauts, this must be specified in the IDN notation. 4

WordPress stores all paths of images and files within posts or pages in absolute terms. This means that the previously active domain is included in the path. When changing domains, these paths are not automatically updated, so this must be done manually after changing the domain.

The simplest solution known to us to adjust incorrect path information in WordPress is via the «Better Search Replace» plugin.

Alternative variant

If you do not have access to the WordPress backend, there is another way to change the stored domain.

1 Open the file manager or connect to the web hosting via FTP. We describe how you can edit a file on the web hosting in the article «Managing files on the web hosting». 2 Navigate to the directory where your website is stored. 3 Open the file
wp-config.php and navigate to the «Authentication Unique Keys and Salts» section. 4

Add the following lines there, using instead of use your own new domain. If these two lines already exist in the file, they can simply be adjusted accordingly.

define( 'WP_SITEURL', '' );
define( 'WP_HOME', '' );

Once the file is saved, you can reload your website. You should now see the new URL in the address bar of the browser.

For more information, see the official WordPress documentation «Changing The Site URL».