Friday, April 19, 2024

How Can I Change My Domain Name On WordPress

Don't Miss

Redirect The Former Domain

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

It’s time to ensure your old website is redirected to the new website, as audiences might still stumble upon your old URL or forget that you’ve changed to a new domain. By redirecting, they can type in the old domain and still end up on your new domain.

To set up these 301 redirects, as they are called, go to your hosting control panel and choose the file manager. Go to the .htaccess folder, and right-click to edit. Add the following code, changing newdomain’ to your new domain, to the top of the page:

#Options +FollowSymLinksRewriteRule ^$ http://www.newdomain.com/$1 

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.

Originally published Dec 25, 2020 7:00:00 AM, updated December 25 2020

Topics:

WordPress Domain Name Change

Changing the domain name of a WordPress site is easy and shouldnt take a long time if done correctly. However, if you are not careful during this process, you may end up making your site inaccessible. This is why it is good to make a full backup of your files and database before making any major changes.

Now lets start the steps of changing the domain name of your WordPress site!

Also Check: Squarespace To Godaddy

Change WordPress Url Via The Admin Dashboard

The first and most common method is to change your WordPress URL directly from within the admin dashboard. In the admin menu, go to Settings > General to access the general settings screen. You can then update the following:

  • WordPress Address : The address to reach your site.
  • Site Address : The address of your WordPress core files.

General settings WordPress URL

Both should match unless you are giving WordPress its own directory. Remember that after you click Save Changes, your WordPress dashboard is now only accessible via the new URL. So be sure to check that youve entered the right URL.

If you do accidentally enter the wrong URL, you can override the settings in the admin screens by editing your wp-config.php file .

Note: If the fields above are grayed out, it is most likely because you already have hard-coded values in your wp-config.php file. In which case, jump to the next method.

If youre creating a fresh WordPress installation on Kinsta hosting, you will be given a temporary URL, such as sitename.kinsta.cloud. You can use the directions above to update the address.

You might also need to clear your WordPress cache after updating the URLs, otherwise you might receive a redirect error. If youre a Kinsta client, you can clear your cache from the MyKinsta dashboard under the Tools section for your site.

MyKinsta clear cache

Get Support For More Common WordPress Questions From Wp Engine

How can I change the domain name for my WordPress site ...

Of course, a task as major as changing your domain name requires you to have confidence in your site as well as your hosting provider. WP Engine is the market leader in reliable WordPress hosting, and whats more, our support team is stellar!

There are many WordPress-related tasks you may not be sure how to approach, but help is at hand. We have a dedicated Resource Center packed to the roof with helpful articles , which you can access whenever you need it. Check it out today!

Join the 1.2M websites that trust WP Engine as their WordPress host.

You May Like: How Much To Purchase A Domain Name

How To Change Your WordPress Domain

Changing domains can seem like quite a daunting task at first, but it doesnt have to be. Typically this involves routing traffic to go from your old domain to your new domain . One of many peoples biggest and valid concerns is how to maintain SEO benefits throughout the entire process, as not to harm your business.

We see a lot of these types of migrations at Kinsta and so weve put together this in-depth guide below with everything you need to know on how to safely change WordPress domains, without destroying all the hard work youve done.

Redirect Old WordPress Domain Permanently

The final step to changing WordPress domain requires you to create a 301 redirect a URL redirection from your old domain to the new one. Additionally, the redirect will carry over Googles PageRank, making sure that all of your efforts put into SEO dont go to waste when moving to a new domain.

We recommend keeping your old domain active for a while. This both allows users to find you if theyre not aware of the domain change and lets the search engines recognize the redirection.

Lets dive into the hPanel to edit the .htaccess file and create a 301 redirect:

  • Go to hPanel-> Files -> File Manager.
  • Select your old domain and click Go to File Manager.
  • Find the .htaccess file in the public_html directory.
  • Right-click and choose Edit.
  • Insert the following code, after replacing http://yoursitename.com with your new domain, then press Save & Close.
  • #Options +FollowSymLinksRewriteEngine onRewriteRule ^$ http://yoursitename.com/$1 

    Same as with the modifying wp-config.php, this step can be completed with an FTP client.

    Don’t Miss: How Much To Purchase A Domain Name

    Change The Website Url From Your WordPress Dashboard

    Now you need to change your domain name on the settings page of your WordPress site. To do this, head straight to the WordPress dashboard and choose from the Settings -> General sidebar. Then replace the old domain name with the new one as shown in the screenshot below:

    Once youre done, be sure to click on the Save button.

    The work is not yet finished. Before you can access your site again from the new address, complete the following steps.

    Pointing A Domain Name At Your Site From A Domain Registrar

    Changing Domain Names For WordPress

    If you bought your new domain name from a domain registrar that isnt also your hosting provider, youll need to start by telling the domain registrar that the domain name needs to point to the server that your site is hosted on.

    In SiteGround, you can find information about your servers address by logging in and then clicking on Websites > Site tools > Dashboard.

    Scroll down to the Site Information section, where you’ll see your IP address and nameservers.

    Use the nameserver addresses with your domain registrar to have your domain point to the nameservers your site is using on SiteGround.

    Note: If youre using email provided by your domain registrar, youll need to use DNS settings instead. If youre using a third-party service such as Gmail, you can point your domain to SiteGrounds nameservers and then point your MX records to Gmail.

    You May Like: How To Find Email Domain And Server

    Update All Internal And Hardcoded Links

    Now that you have your WordPress site address and URL changed to the new domain, its time to update all of your internal and hardcoded links. Generally, it is not recommended to hard-code URLs but most likely over time you probably have, we all do it. This includes interlinks between your own content, media, links to JavaScript and CSS on your site, etc. Below are a couple of options you have for updating your links.

    Option 1 Kinsta Search and Replace Tool

    If youre a Kinsta client, we have an easy to use search and replace tool in our MyKinsta dashboard.

    Kinsta search and replace tool

    Here are simple steps to update your old domain to your new domain:

  • Enter in the search field the value you want to search for in the database, which in this case is our old domain: https://olddomain.com.
  • Enter in the replace field the new value that should be used to replace the value that you are searching for. In this case, it is our new domain: https://newdomain.com.
  • Ensure the Dry Run option is selected first, as this will count how many replacements will be made without actually making the replacements. Then click Replace.
  • You can then run Replace again without Dry Run selected to make the changes in the database.
  • Search and replace in WordPress database

    Check out our search and replace tutorial for additional details. You can always reach out to our support team if you need assistance with this.

    Option 2 Update Links With WordPress Plugin

    Update your CDN

    How To Change A WordPress Domain Name

    Aren’t Facebook groups for entrepreneurs are fan-freakin-tastic? That’s where I’ve found many of you guys, connected with some amazing ladies and gents and bounced ideas off people a lot smarter than me!

    This week one of those helpful people pointed out that I can’t use WordPress in my domain name because my biz doesn’t meet the WordPress Foundation’s criteria for using the name.

    If I wanted to run WordPress Ally as a non-profit I could keep the name And I love y’all and stuff, but this girl’s gotta eat! Even though I’m not charging you guys for my training, my site is monetized in other ways.

    I don’t know if WordPress ever would have tracked me down, but I’m a total rule-follower so I’m not gonna chance it.

    I originally called this training Website Essentials Academy and it did not perform well. So I was pretty bummed because I put a lot of thought into naming WordPress Ally .

    I chose WordPress Ally because I am ON YOUR SIDE. I don’t want you to spend more money than you have to. I don’t want you to spend more time than you have to. I don’t want you to be frustrated trying to figure something out that I’ve spent a ton of time figuring out and I can give you the shortcuts.

    I had to go back to the drawing board on my name, and I was stumped. So I referred to the How To Name Things So They Sell Including Your Company, Your Products, Your Services or Your Dog chapter of Brandgasm 101 to get some clarity.

    Read Also: Buying And Selling Domains For Profit

    Do You Have Any Questions About Changing Your WordPress Url

    Most simple modifications only require you to go into the WordPress dashboard or wp-config.php file. Other than that, we suggest reaching out to a developer when tweaking your database or using command lines.

    Finally, you can also change the URL for other parts of your WordPress site. For example, we have that you might find useful.

    Still have any questions about how to change your WordPress URL? Let us know in the comments below.

    Free guide

    Changing The Domain Name That Points To Your WordPress Site

    How Can I Change My Domain Name

    The first step is to get your new domain name pointing to your WordPress site.

    This is easier than you may think in fact, you can have more than one domain pointing to your site. So if you just need an extra domain name, you only need to follow this step.

    Note: Any links to your content using the old domain will take people to your 404 page or your home page. To fix this, youll need to set up redirections, which you can do with a plugin or in the SiteGround admin screens.

    Read Also: What Is The Io Domain Used For

    Changing The Domain Of Your WordPress Site

    As a business entity, you may want to promote a popular product known by more than one name, and you would like to use separate domains for each product. This is when you may need to duplicate your WordPress site’s content and use it on a different domain name.

    Instead of designing a new separate site for each domain, you may use the content existing in your current domains. The following guide will assist you in duplicating a WordPress site.

    BackupImportant Note

    How To Configure WordPress To Work With A New Domain

    There are few ways to change the domain name on your WordPress application:

    • From the WordPress admin Dashboard

    Access your WordPress Dashboard > Settings> General.

    Under the WordPress address and the Site address fields enter the domain that you wish your application to work with and save the changes.

    The same modification is valid if you want to add www to your domain.

    • Using phpMyAdmin

    Change the siteurl and home options in your WordPress database. To do this, use the phpMyAdmin tool available in your Site Tools.

    Once in phpMyAdmin, select your WordPress database and browse the table wp_options. Find the options siteurl and home and change their values to the new domain you want to use.

    You May Like: Domain Registration Cost Per Year

    Edit The Functionsphp File To Update The Database

    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.

    How To Properly Move WordPress To A New Domain Name

    How To Change WordPress Domain Name GoDaddy Managed WordPress

    Do you want to transfer your WordPress website from one domain name to another domain on the same server? Switching to a new domain name may affect the search engine rankings of your website. To minimize this impact, youll need to follow a specific step-by-step process to get your search position back after transferring your site.

    In this article, well show you how to properly move your WordPress site to a new domain name with minimal effect on SEO.

    Also Check: How Much Does A Domain Cost

    Reviewing How To Change The Domain Name On WordPress

    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.

    More articles

    Popular Articles