Thursday, April 25, 2024

How Can I Change My WordPress Domain Name

Don't Miss

Reviewing How To Change The Domain Name On WordPress

How to Change Domain Name / Website Address / URL of Your WordPress Site

Changing your WordPress domain name is a common problem, but the built in solutions offered for your WordPress site mean it is achievable. In this tutorial youve learned how to manually tweak the URL address settings and PHP code through a file manager or FTP client to cleanly change your domain.

Heres a quick recap:

  • Perform a full website backup
  • Purchase and register a new domain
  • Add the new domain name and restore the sites backup
  • Change website address in WordPress settings
  • Update wp-config.php file
  • Update site database
  • Redirect visitors and search engines to your new domain.
  • Seven steps is all it takes to learn how to change the domain name on your WordPress site, but there are many other tools and features to master on WordPress. Our many other guides will make you an expert on all things WordPress.

    If you enjoyed reading this article on how to change the domain name on WordPress, you should check out this one about how to hide the author in WordPress.

    Create A Database For The New Domain

    Before you can clone a copy of your WordPress website on the new domain name, youll need to create a new database.

    Log in to your web hosting cPanel account. In most cases, that will be at your domain name followed by forward slash cpanel, like this: theblogmechaic.com/cpanel

    If you dont know your cPanel username and password, contact your web hosting provider for help.

    Once logged in to cPanel, scroll down to the Databases section and click the MySQL Database Wizard icon.

    Give your WordPress database a name. Five letters work best. Click Next Step.

    Enter a database username. Again, five characters work best.

    Make sure you write the password down or copy and paste it on a notepad document. Youll need it in the next step.

    Upon completion, click Create User.

    On the next page, copy the database information and add it to the notepad document with the password.

    Select All Privileges. Click Next Step.

    And thats it! You have successfully created a new database.

    ManageWP should have finished backing up your WordPress site now.

    Lets continue.

    How To Change The Domain Name Of A WordPress Site

    At some point you may discover the need to change the domain name of your WordPress website. Maybe you found a better domain name, or you were using a temporary domain to set everything up. Either way youll need to change a few settings inside of your WordPress installation in order to make the transition to your new domain smooth.

    If you need to migrate your website to a new server, please refer to this guide for migrating without experiencing downtime.

    You May Like: How To Get Com Domain For Free

    Scenario : Changing A WordPress Domain

    It is also possible to change a domain but keep the website content and web hosting provider. This is known as a domain name change. A website operator might choose this route if they are unhappy with their websites current internet address. In this case, you can register anew domainand link it to your website.

    There are many other reasons for connecting a new domain to an existing website. For example, some websites are first tested in a development environment. Only once its verified that everything works as intended does the website go online and become available to the public. In a case such as this, the web presence has to then be linked to a new domain.

    The range of reasons for changing a domain gives way to a variety of different approaches to connecting a WordPress website to a new web address. In any case, its important to set up a domain redirect on the old site, which forwards users automatically to the new domain. Otherwise, you could experience a significant loss in page traffic and a lower ranking in the search engine results. For security reasons, you should always back up your website before changing your WordPress domain.

    Putting Wpmu Dev Nameservers In Your Domain Registry Records

    Changing Your WordPress Domain Name While Moving Your Site to a New ...

    Now that weve imported your domain details into WPMU DEV, the next step is to overwrite the nameserver records of your registrars with ours.

    There are a lot of registrars, so how your domain details are kept and displayed will vary, but they should all have the same key elements. We cover more than a dozen of the most popular ones here.

    In the case of registrars that serve as hosts, what they permit when it comes to allowable changes in nameservers can vary. For example, pointing nameservers to another host is not permissible for a Wix-purchased domain. However, you can transfer your domain away from them .

    Assuming your domain registrar allows for pointing nameservers away from them, or that youve taken any necessary prior steps in preparation, login to their website and locate the records for your domain.

    Namecheap

    Popping back over to the Hub, copy that first nameserver, then head back to your domain registrar details page, pasting it in the appropriate text field. Do this for all three nameservers, then save your input.

    Depending on your registrar, youll probably get a confirmation message with time estimates on how long it will take the DNS hosting server to update.

    Its rare, but on the outside chance your domain registrar requires identifying our nameservers by IP address, you can find them here.

    Don’t Miss: How To Make An Email That Matches Domain

    Change WordPress Address In Admin Dashboard

    You can also adjust your WordPress URL settings directly from the admin dashboard. This method will typically work if you havent moved your WordPress installation and arent having any issues access it.

  • Login to WordPress admin dashboard
  • Click on Settings > > General
  • Fill in your WordPress Address and Site Address and click Save.
  • Be aware with these settings in the wp-config.php file, the ability to modify them from the dashboard is lost.

  • Edit your wp-config.php file.
  • Define your WP_HOME and WP_SITEURL settings by inserting these lines towards the top:
    define define 
  • Prepping For A Change In Domain Nameservers

    Nameservers are often referred to as the phone book of the internet, sending you to the correct domain when you type in a web address.

    There are two primary components to making your website accessible to the public:

  • Your domain name
  • The first must point to the second to connect the two.

    The registrar you purchased your domain from also has its own nameservers , however if you want them managed elsewhere you must change the DNS records.

    Doing it all from a single location is ideal, as it cuts out the middle agent and puts the same quality that powers your sites behind your DNS.

    DNS propagation is the term for your sites nameservers and other records updating across the web. This process can take anywhere from a few minutes to a couple days to finalize.

    If your site was already live, it might become briefly inaccessible to visitors during the nameserver change. You could create a temporary page with info regarding the approximate downtime, then publish it just prior to the server change. .

    Its also helpful to handle nameserver changes during a period when traffic volume is typically on the low end.

    Also Check: How To Renew Domain Name Shopify

    How To Change The Domain Name On WordPress

    There have been many inquiries from users who are unhappy with their url and site addresses and want to know how to change the domain name on WordPress.

    This article will offer step-by-step instructions on how to change to a new domain name on any WordPress website.

    Seasoned developers can readily change their site address, but its a fundamental skill that will benefit all users.

    Though changing to a new domain name on WordPress-powered sites is a common request, nevertheless it can potentially damage the internet presence youve worked hard to build.

    So while change is good, be cautious if you own an already well-established WordPress website.

    Edit The Functionsphp File To Update The Database

    CHANGE the DOMAIN NAME on your SITEGROUND WordPress Website

    This option is a temporary command and should not be used as a permanent solution. Use this method only when all other options have failed and/or your site is not accessible through the front end.

    Add the following two lines of code directly after the < ?php line in functions.php and be sure to replace both instances of example.com with your target domain:

    update_option update_option 

    Upload the edited file to your site, and then log in to the admin page a few times. This will trigger an update of your options in the database. Once your site is functional, you should remove the two lines of code from the functions.php file. The database will remain updated.

    If your WordPress theme doesnt have a functions.php file, you can create one by wrapping the two lines of code listed above in php tags like the following:

    <  ?phpupdate_option update_option ?> 

    The above code can be saved in a plain text file called functions.php and uploaded to your themes main directory. Youll want to log in to your admin panel a few times to trigger the command, and then remember to delete this file after your database has updated the options.

    After changing the proper values using one of the options above, the domain for your WordPress website should now be changed.

    Larry is an independent business consultant specializing in tech, social media trends, business, and entrepreneurship. Follow him on Twitter and LinkedIn.

    Read Also: Do You Have To Pay For A Domain

    Follow These Tips For A Stress

    No matter the reason, changing a domain name can feel stressful. Even just finding a new domain can be a process in-and-of itself.

    But with a little preparation and this guide on handling WordPress domain changes, you can have your new domain set up in no time regardless of whether you do everything manually, or install a plugin to lend you a hand.

    Additional Items Of Note

    There are other things you may wish to change in order to correct URLs when moving sites.

  • Images link: image links are stored in post_content in the wp_posts table. You can use the similar code above to update image links.
  • wp_options: Besides the siteurl and home items mentioned above, there are other option_value which also need revision, such as upload path, and some plugin items
  • To fix widgets that contain outdated URLs, you may edit them in Dashboard / Appearance / Widgets.
  • Do a FULL database search for any items left. MAKE SURE you know what you are changing. and go through each item for possible improper replacement.
  • If you a running a network / have multiple sites, you will need to replace instances of the URL in the database. They are stored in many tables, including each one of the sites . Be careful in what you replace and be sure you know the meaning of the field before changing it. See the Important GUID note below for an example of what not to change.
  • Note, if you find your old url in the database options table under dashboard_incoming_links, you can ignore or delete that option. Its unused since WP 3.8.
  • Using the Export/Import feature to move a blog to a new domain.

    Important GUID Note

    When doing the above and changing the URLs directly in the database, you will come across instances of the URL being located in the guid column in the wp_posts tables. It is critical that you do NOT change the contents of this field.

    You May Like: What Is Active Directory Domain Services

    Copy Files/content To The New Domain

    Click here to add the new domain in the cPanel’s Addon Domains section, then complete the following steps to copy files to your new domain.

  • Log in to cPanel.
  • Look for the Files section, then click File Manager.
  • Open the public_html .
  • Click Select All found on top of the screen.
  • Press the Ctrl key while clicking the files/folders in your public_html folder:
  • addon domain directory
  • Once the files are highlighted, click Copy in the top menu of the File Manager. A pop-up will open, showing the file path:
    /public_html
  • Type the name of the addon domain directory to which you are copying the files. This box should now look similar to:
     /public_html/youraddondomain.com

    Replace youraddondomain.com with your actual new domain name

  • Click Copy File.
  • If you are unfamiliar with the File Manager and would like to learn more about how to use it, please read:

    Prepare By Gathering All Necessary Information

    How do I switch my WordPress to point to Parked Domain?

    Before you change your domain name, youll need the following information immediately accessible:

    • Your WordPress administrator login credentials. This is the username and password used to log in to the WordPress dashboard.
    • Your file manager or cPanel login credentials.
    • Your FTP login credentials.
    • Access to PHPmyAdmin through your control panel.

    Youll also want to make a complete backup of your WordPress installation.

    Here are four options for changing your WordPress domain name, starting with the easiest method and ending with two options that should only be used if you cant get the first two to work.

    Recommended Reading: How To Check If A Website Domain Is Available

    Changing Your Sites Primary Domain With Siteground

    Log in to your SiteGround account and click the Websites option at the top of the screen to go to the website management screen.

    Find the website whose primary domain name you want to change, and click on the three dots to the right to reveal the shortcut menu.

    Select the Change Primary Domain option.

    In the next screen, type in the new primary domain. This will not register a new domain for youyou need to have already registered the domain and have it pointing to your nameserver at SiteGround.

    The system will then process your request and give you a success message when thats done.

    Change A Domain In WordPress

    Follow the steps below to update your WordPress site to use a new domain name. After changing the domain in WordPress, you may also need to update the domain on the hosting account.

  • On the left side menu, select Settings> General.
  • Update the following fields with the new domain name:
  • WordPress Address
  • Site address and WordPress address are usually the same for standard WordPress installations.

  • Scroll down and select Save Changes.
  • Now you need to update the domain name within your hosting control panel for Linux Hosting with cPanel or Windows Hosting with Plesk.

    Recommended Reading: How To Find Out When A Website Domain Expires

    Reasons To Change Domain Names

    There are a lot of different reasons why you might want to change domain names. Here are a few common examples:

    • Your business is rebranding from one name to another and you have a new domain name to go along with it.
    • Perhaps you were using a less popular top level domain and finally acquired that new and shiny .com for your business.
    • Your merging multiple properties into one domain.
    • Your old domain is suffering from a site-wide penalty and you need to start from scratch.

    What To Know Before You Create A New Domain Name

    How To Change WordPress Domain Name – Move WordPress To New Domain – Siteground Softaculous

    Changing your WordPress domain name is simple, but there will be the occasional need to adjust your websites PHP code. This code is essential to the operation of your website and mistakes made there could bring your domain to a halt. Some quick prep work before you start will guarantee the process goes smoothly.

    • Before doing anything, create a full backup of your website. Do this either manually by exporting your database or by using one of many backup plugins. Some reliable options are Updraftplus, BlogVault, and VaultPress.
    • Buy and Register your new Domain name by pointing it to the correct name servers.
    • Have a File Transfer Protocol client. The FTP will allow you to access your server directly from your computer. Theyre easy to use, but be prepared for some learning curve. We recommend FileZilla, a great FTP for beginners to brush up their FTP skills.
    • Head to Hostingers Domain Checker and type in your preferred new domain name. The checker will tell you if that option is available and it will offer some alternative suggestions in case that domain is already taken.

    Read Also: How To Find Out Domain Name

    Redirect Old Domain To New Domain

    In this stage, you will require to setup a permanent 301 redirect to your website. This will help with both user experience and SEO of your site. Your users, who will land to your website from search engine, will be redirected to your new domain.

    To set up permanent 301 redirect, log in to your cPanel and click on the file manager and open your websites folder. Now, find the .htaccess file and click on edit.

    Now, add the following code to the top of your .htaccess file.

    #Options +FollowSymLinks

    You must replace newsite.com with your newly added domain name.

    Misc Post Domain Change Updates And Checks

    Due to the fact that every website uses different software and services, there will most likely be a few additional things youll want to check. Below is a list we have compiled of some common ones weve experienced:

    • If you migrated or cloned your site we commonly see changes or misconfigurations in the robots.txt file.
    • If you are running a comment plugin such as Disqus, you will need to to a new domain.
    • If you have email marketing software you will most likely need to update your domain, as well as authenticate your domain again with new DNS records.
    • Update Social Media Links
    • Update PPC Ad URLs: AdWords, Bing Ads, AdRoll, Facebook Ads, etc.
    • If you are involved in any affiliate programs or ad networks such as Mediavine, you might need to update your address with them as well as go through a re-approval process.
    • Make sure to monitor 404 errors after moving to a new domain so that you can fix any broken links that pop up. You can view these in Google Search Console under Crawl > Crawl Errors or utilize a third-party WordPress plugin such as Redirection which has 404 error reports. Note: We normally recommend Google Search Console for these kinds of things because plugins like these just utilize additional server resources.

    Also Check: Is Buying A Domain A One Time Purchase

    More articles

    Popular Articles