How to Change WordPress Website Address

Have you finished developing a website on your home computer? Would you like to transfer it to another domain? Today, you will find out several ways to solve this simple task without installing special plugins.

So, let’s learn how to change website address on WordPress!

Intro

Among all the settings in WordPress, the most important are only two. They are “WordPress Address” and “Website Address”. Both are located in the “Settings” – “General” section. “WordPress Address” is directly your domain, and “Site Address” is a place where WordPress is installed. It can be a subdirectory of / blog / of the main domain, etc.

These settings are also responsible for how your website URL will look. They are set at the installation stage and, most often, there is no need to change them in the future. But if you decide to transfer your site to a new domain, or place it in a subdomain or subdirectory, then you need to update these settings correctly. Otherwise, you will get a 404 error because current addresses won’t match the new address of your site.

There are several ways to change these settings. Let’s look at them. Yet, before we start, it’s reasonable to remind you to do backups. Thus, you won’t lose your content.

Changing Website Address on WordPress in wp-config.php File

This is the easiest way to change the settings we need, but it requires experience of working with your hosting FTP and editing files through an FTP client, for example, FileZilla.

  • To solve this problem navigate to your server cPanel File Manager. Locate wp-config.php file in the WordPress directory and click on Edit button.WordPress website address
    If you’re using FTP client, you need to download the file from the server before editing it. Download it to your hard drive and open the needed file with any text editor.
  • Remove WP_SITEURL and WP_HOME values.
  • Input your new website URL instead of http://domain.com.
  • Save the changes.

Changing Website Address on WordPress through functions.php

This method is also very popular for changing website address on WordPress. What you need to do is to add two lines to the functions.php file located in the directory with your theme. After that, go to the new address of your site, wait a couple of minutes and … that’s it! Your website will automatically write the required values ​​into the database. After, everything should work properly.

If suddenly the site isn’t opened, try to clear your browser’s cache.

Finally, you’ve discovered the most popular ways to change the website address on WordPress! Try them!