Loading...

Knowledge Base
 Up to 75% off  on  WordPress  hosting for WordPress Websites and Stores!

How to Manually Change Your Domain Name in WordPress

Getting Started — Change Domain Name In WordPress Manually

There may come a time when you need to duplicate your WordPress site's content and use it on a different domain name. This guide is the manual method of using WordPress to change domain name features.

Instead of designing a new site for each domain, you may choose to use the existing content in one of your current domains. The following article will guide you through duplicating a WordPress site.

Before You Get Started: Revisions to your website, such as this process below, are considered major revisions. Please make a backup before you begin.

Please be aware that the steps below may not be enough to change your domain successfully due to WordPress's communication with the server. It is strongly advised you make a full backup (website files and databases) of your website using the Backups button in cPanel before proceeding with the remaining steps in this article.



How to Prepare for a Domain Name Change

To ensure a smooth transition with minimal downtime and no data loss, thorough preparation is crucial. Get ready for a domain name change with our guide:

  • Back up your current site. Before making any changes, it's important to create a complete backup of your WordPress website. This includes all files, databases, and any other content. Backing up ensures that you can restore your site to its original state if needed. You can use WordPress plugins like UpdraftPlus or BackupBuddy to automate this process, or you can manually export your site's content through your WordPress dashboard.
  • Ensure access to a hosting dashboard or an FTP client. To implement the domain name change, you'll need to access your web hosting environment. This could be through your current hosting dashboard provided by Bluehost or via an FTP client such as FileZilla. Access to these is necessary to upload files, make changes to your WordPress configuration, and manage your new domain settings.
  • Select and register a new domain name. The domain name you choose is critical—it should reflect your brand, be easy to remember, and be relevant to your audience. Once you've decided on a new domain name, you'll need to register it with a reliable web host.

Step 1: Acess File Manager and Copy Files to the New Domain

If you need a more comprehensive guide on file manager copying and moving files, view this guide: File Manager - How to Copy and Move Files.

To add a new domain, follow our guide on how to register a domain. Then, complete the following steps below to copy files to your new domain.

  1. Click the Websites tab from the side navigation menu to the left, choose the website you want to manage, and click Settings.
    dns-manage-button
  2. Click FILE MANAGER.
    File Manager button
  3. Open the public_html folder.
  4. Along the top of the screen, click Select All.
  5. Press and hold the Ctrl key while clicking (un-selecting) the following folders in your public_html folder:
    • .qidb
    • cgi-bin
    • addon domain folder
  6. With the files still highlighted, click Copy in the top menu of the File Manager. A pop-up will open showing the following path: /public_html
  7. Type the name of the addon domain folder to which you are copying the files. This box should now look similar to /public_html/addondomainname.com. (Replace addondomainname.com with the actual domain.)
  8. Click Copy File(s).

Step 2: Create a New MySQL Database

  1. Once the files have been copied over to your addon domain folder, open the MySQL Database Wizard on another screen in cPanel.
  2. Next, you will follow these steps to create a new MySQL database.

Step 3: Edit the WordPress .config File For Your New Site

To edit the wp-config.php file for WordPress, you must first log in to your Bluehost Account Manager.

If you need help or a refresher, our guide, How to Log in to WordPress Directly, can help.

  1. Click the Websites tab from the side navigation menu to the left, choose the website you want to manage, and click Settings.
    dns-manage-button
  2. Click FILE MANAGER.File Manager button
  3. Open the public_html folder and locate your addon domain folder.
  4. Right-click on the wp-config.php file and click the Code Edit or Edit button.
  5. When this page opens, edit the following information to reflect the values assigned to the new database created in the previous step.
    • DB_NAME
    • DB_USER
    • DB_PASSWORD
  6. Click the Save Changes button.

Your wp-config.php file should reflect the correct database name, database user, and database password. This is essential for WordPress to know which database to obtain the information from.

Step 4: Export the Database

Export the database from the primary domain and import it into the newly created database. For help with this process, please refer to the following articles:

Step 5: Update the Database

You can update your database, but first, the database settings must be updated to reflect the new domain name information.

  1. Log in to your Bluehost Account Manager.
  2. Click the Hosting tab from the side navigation menu to the left. Choose the website you want to manage, and click Settings.
    rock-bluehost-databases-phpmyadmin
  3. Click the PHPMYADMIN button.
    rock-bluehost-databases-phpmyadmin
  4. In the left navigation panel, click on the newly created database name.
  5. In the left navigation panel, click wp_options.
  6. Click Edit on the siteurl line.
  7. Change the primary domain name to the addon domain name, then click Go.
  8. Click Edit on the homeurl line.
  9. Change the blog name to reflect your new blog, and click Go.
  10. Click Edit on the blog description line.
  11. Change the blog description to reflect your new blog, and click Go.
  12. In the left navigation panel, click wp_users.
  13. Click Edit on the theuser_login line and change the user name to reflect your choice's new login username.
  14. Change it on the user_nicename line as well. For security purposes, do not use Admin as either username.
  15. On the user_pass line, highlight and delete the characters already in that box.
  16. Create a new password of your choice.
  17. To the left is the varchar(64) box; click the down arrow and select MD5.
  18. Click Go.

You can test these changes by visiting http://yourblogname.com/wp-login.php (replace yourblogname.com with your actual domain name).

You should now be able to log in to your newly imported WordPress site.

Step 6: Update the Database Tables

Once the domain is working, you can log in to the WordPress Dashboard of the new site and install the Search and Replace plugin. It will allow you to search all of the tables in the database, search for your old domain, and replace each instance with your new domain. You can uninstall the plugin after the tables have been updated. In addition to the database, you should check your site for any links hard-coded into widgets, etc. Please edit the links manually to reference your new site address. For additional information on using this plugin, please review the following article:

Step 7: Update WordPress

  1. Log in to your WordPress Dashboard.
    wp-login
  2. In the left navigation menu, go to Settings.
  3. Click General.
    wordpress-setting-general

It is very important to make sure each of the following fields displays your new domain name and not the old domain name:

  • <↑> WordPress Address (URL)
  • <↑> Site Address (URL)

See our helpful guide on how to change your WordPress URL. We also have a separate blog on how to create redirects in WordPress to retain all your traffic and SEO value.

Summary

To ensure a successful manual domain name change on your WordPress website, you must download a backup of two essential parts of your website: your WordPress website files and the related WordPress website database. With the steps implemented above, make sure the new domain you are using is registered and activated for a smoother transition from the old domain to the new domain name.

Do you have a backup system in place? A faster and easier alternative to download or restore a WordPress website (website files and/or database files) is CodeGuard. It also makes incremental backups and notifies you when files have changed or moved. So you have various restore dates to choose should you need to restore your database, website, or both.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...