How to Change Domain on WordPress (Easy)

Changing your WordPress domain can seem like a daunting task, but it doesn’t have to be. In fact, with a little bit of guidance, even beginners can manage it with ease.

This guide will teach you everything you need to know to change your WordPress domain. Just follow the steps below and you’ll have your new domain up and running in no time!

Step 1: Back Up Your Site

The first and foremost step is to back up your entire website. This is to ensure the safety of your content, and so that you can restore everything if there’s any issue during the process. There are several WordPress plugins that can help you with this, including UpdraftPlus and BackupBuddy.

Step 2: Purchase a New Domain

Next, you’ll need to purchase your new domain name from a registrar, such as GoDaddy or Namecheap. After purchasing, point this new domain to your hosting account. The process might differ depending on your registrar, but it’s generally a matter of changing your DNS settings.

Step 3: Change the WordPress Address and Site Address

To change your domain, log in to your WordPress dashboard. Navigate to ‘Settings’, then ‘General’. Here, you will see two fields: WordPress Address and Site Address. Change the URL in these fields to your new domain name.

It’s important not to use a trailing slash at the end of your URL. For example, use https://www.yournewdomain.com and not https://www.yournewdomain.com/. Ensure that the ‘https://’ part matches what your site currently uses; if it uses ‘http://’, then use ‘http://’.

Step 4: Update Your Database

Now, you need to update your WordPress database. Install and activate a plugin named Better Search Replace, which can help update all links in your database to the new domain name. It’s vital to replace all old URLs with the new ones.

After activating the plugin, go to ‘Tools’, then ‘Better Search Replace’. In the ‘Search for’ field, add your old domain without the ‘http://’ or ‘https://’ and ‘www.’ In the ‘Replace with’ field, add your new domain in the same format. Select all tables and run the plugin.

Step 5: Change the Domain in Your wp-config.php File

You may need to update your ‘wp-config.php’ file with your new domain.

  1. Access your website files using an FTP client such as FileZilla.
  2. Find the ‘wp-config.php’ file in your WordPress root directory and edit the file using a text editor.
  3. Add these two lines at the end of it:

define( 'WP_HOME', 'http://newdomain.com' );
define( 'WP_SITEURL', 'http://newdomain.com' );

Replace ‘newdomain.com’ with your new domain name, add ‘www.’ or ‘https://’ where necessary.

Save the file and upload it back to your website.

Step 6: Update Your Website’s Permalinks

To finish off, update the permalinks of your website. Simply go to the ‘Settings’ and then ‘Permalinks’ in your dashboard. Click on the ‘Save Changes’ button. This is to ensure that all your article and page links are working properly.

Step 7: Test Your Website

Finally, visit your website using the new domain. Check if everything works. Test all pages, posts, and functionalities. If you run into any issues, WordPress’ troubleshooting guide, might help.

Remember, it may take up to 48 hours for the DNS changes to propagate throughout the internet, which means your site might not be immediately accessible to everyone on your new domain.

And that’s it! You’ve successfully changed the domain of your WordPress site.

The process might feel challenging at the beginning, but with this guide handy, you’ll be able to navigate it without struggle. Good luck, and here’s to your new web address!

Leave a Comment