fbpx

How To Change Your WordPress Website’s Domain Name

If you want to change your WordPress website’s domain name, there are a few steps you need to take. First, you will need to purchase the new domain name and set it up with your web hosting provider. Next, you will need to update your WordPress installation to use the new domain name. Finally, you will need to redirect traffic from your old domain name to your new domain name.

Changing your WordPress website’s domain name can be a bit of a hassle, but it’s definitely worth it if you want to give your site a fresh start with a new URL or want to change your business name. Follow the steps below, and you’ll have everything set up in no time.

We always recommend doing a full WordPress backup and storing it somewhere safe before making any changes to your website. That way, if something goes wrong, you can always restore your site to its previous state.

Quick steps to change your domain.

1. Purchase the new domain name and set it up with your web hosting provider.

2. Update your WordPress installation to use the new domain name. You can do this by going to the WordPress settings page and changing the “site address” setting to your new domain name.

3. Redirect traffic from your old domain name to your new domain name. You can do this using a WordPress plugin like Redirection, or by editing your .htaccess file directly.

That’s it! Once you’ve completed these steps, your WordPress site will be accessible at its new domain name.

If the above does not assist you in changing your WordPress domain name, you can follow the in-depth guide below.

An in-depth guide is below:

Step 1: Purchase the new domain name and set it up with your web hosting provider.

The first thing you need to do when changing your WordPress website’s domain name is to purchase the new domain name and set it up with your web hosting provider. If you’re not sure how to do this, check out our article on how to buy a domain name.

Once you have purchased the new domain name, you will need to set it up with your web hosting provider. This usually involves creating a new account with the web hosting provider and then adding the new domain name to that account. Check with your web hosting provider for specific instructions on how to do this.

Step 2: Update your WordPress installation to use the new domain name.

Once you have purchased the new domain name and set it up with your web hosting provider, the next step is to update your WordPress installation to use the new domain name. You can do this by going to the WordPress settings page and changing the “site address” setting to your new domain name.

To do this, log in to your WordPress dashboard and go to Settings » General. On this page, you will need to change the “WordPress Address (URL)” and “Site Address (URL)” settings to your new domain name.

After updating these settings, click on the “Save Changes” button at the bottom of the page. Your WordPress site will now be accessible at the new domain name.

If you cannot change the domain by the WordPress admin area, you can change it by editing the SQL database under PHPMyAdmin by:

  1. Logging into your web hosting control panel (cPanel, Plesk, etc.) and opening PHPMyAdmin.
  2. Select your WordPress database from the left-hand sidebar.
  3. Clicking on the “SQL” tab at the top of the page.
  4. Running the following SQL query:

UPDATE wp_options SET option_value = replace(option_value, ‘http://example.com’, ‘http://www.newdomain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

  1. Click on the “Go” button to run the query.
  2. After running this query, you will need to log in to your WordPress site again. This is because the query above only updates the database and does not update the cookies that are set when you log in.

Step 3: Redirect traffic from your old domain name to your new domain name.

The last step is to redirect traffic from your old domain name to your new domain name. This will ensure that visitors who try to visit your site at the old domain name will be automatically redirected to the new domain name.

You can do this in a few different ways, but we recommend using a WordPress plugin like Redirection. This plugin makes it easy to set up redirects from one URL to another and is free to use. The Full guide for Redirection can be found at https://redirection.me/

Once you have installed and activated the Redirection plugin, go to Tools » Redirection and click on the “Add New” button. On the “Source URL” field, enter the old domain name (e.g. example.com), and on the “Target URL” field, enter the new domain name (e.g. www.newdomain.com).

Make sure to select the “Regex” option and then click on the “Add Redirection” button. This will set up a redirect from your old domain name to your new domain name.

If you don’t want to use a plugin, you can also add a redirect by editing your site’s .htaccess file. To do this, connect to your WordPress site using an FTP client or file manager and edit the .htaccess file located in the root directory of your WordPress installation.

You will need to add the following code to your .htaccess file:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com$

RewriteRule (.*)$ http://www.newdomain.com/$1

Replace example.com with your old domain name and newdomain.com with your new domain name. Once you have added the code, save your changes and upload the file back to your server.

Step 4: Notify Search Engines Of Your Domain Change

If you are using Google Search Console (formerly known as Google Webmaster Tools), you will need to update your site’s settings to reflect the new domain name.

Log in to your Google Search Console account and click on the “Add property” button. On the next screen, enter your new domain name and click on the “Continue” button.

Google will now verify that you own the domain, and once it’s verified, you will be able to access all of your site’s data under the new domain name.

If you are using Bing Webmaster Tools, log in to your account and click on the “Configure My Site” link for your site. On the next screen, scroll down to the “Change of Address” section and click on the “Notify Bing of my website’s move” link.

On the next page, enter your old and new domain names and then click on the “Submit” button.

This will notify Bing of your domain change and help them update their records.

Step 5: update your analytics tracking code.

If you are using Google Analytics or another analytics service, you will need to update your tracking code to reflect the new domain name.

To do this, log in to your analytics account and find the tracking code for your new site URL. The code will look something like this:

UA-XXXXX-Y

The XXXXX is your site’s ID number and the Y is the tracking code version.

Once you have found your tracking code, log in to your WordPress site and go to Appearance » Editor. On the right side of the screen, select the header.php file from the list of files and then click on the “Update File” button.

This will open the header.php file in the editor. Look for the tracking code in this file and replace it with your new tracking code. Once you have made the changes, click on the “Update File” button to save your changes.

Your analytics tracking code will now be updated to reflect the new domain name.

Conclusion

That’s it! You have successfully moved your WordPress site to a new domain name without losing any traffic or search engine rankings. If you run into any problems, feel free to contact

our support team, and we’ll be happy to help you out.

Hosted WP specialise in all thing WordPress and can assist with Hosting, Management, Migration, Development, Design, Search Engine Optimisation and Support.

Frequently Asked Questions

How do I move my WordPress site to a new host?

If you want to move your WordPress site from one hosting provider to another, then follow our guide on how to move a WordPress website to another host.

Can I move my WordPress site to a new domain name without changing hosting?

Yes, you can move your WordPress site to a new domain without changing hosting.

Do I need to set up redirects when moving my WordPress site from one host to another?

If you are moving your site from one host to another, then you will need to set up redirects from the old URLs to the new URLs. This will ensure that visitors who try to visit your site at the old URL will be automatically redirected to the new URL. You can do this by using a WordPress plugin.

Can I move my WordPress site to a new domain without losing traffic?

Yes, you can move your WordPress site to a new domain without losing traffic. However, it is important to set up redirects from the old domain to the new domain so that visitors who try to visit your site at the old domain will be redirected to the new domain.

Do I need to update my Google Search Console settings when moving my WordPress site to a new domain?

Yes, if you are using Google Search Console (formerly known as Google Webmaster Tools), you will need to update your site’s settings to reflect the new domain name. You can do this by adding the newdomain.com as a new property.