Monday, April 29, 2024

How To Change Domain Name On WordPress

Don't Miss

Change The Website Url From Your WordPress Dashboard

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

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.

Configuring A Custom Domain On WordPresscom

To begin, lets walk through the necessary steps to configure a custom domain name.

First, visit the WordPress.com domain page, select the site that you want to name, and click the Add Domain button. If you have a free account, youll be asked to upgrade to one of the paid plans.

Next, enter the domain name that you want, and make it your Primary Domain. Your new domain will automatically be associated with your site no extra effort required.

If you already have a domain name from another provider and want to use it on WordPress.com, map your existing domain to your new site. After clicking the Add Domain button, select Upgrade next to the Already own a domain? option. Then, enter your domain name.

Update your settings on the domain registrars website. To make your life easier, WordPress.com compiled instructions for updating a domain name with the most common providers.

For each scenario above, remember that it may take some time for the changes to go into effect.

Change Domain Name Through Ftp Client Or Cpanel

One of the easy methods to change your domain address is by making edits to the wp-config.php file. As a matter of fact, this technique can override whatever changes you might have made via your WordPress admin dashboard.

But since this file lives on your server, you have to access it through FTP using FileZilla Or through your cPanel.

Once you have accessed the file, open it with a text editor of your choice.

If FTP seems to be so much of a work, you can use the cPanel.

To begin with, log into cPanel with your login credentials, then click on File Manager.

After that, scroll down to public_html in the domain folder. Double click on it.

On the next page, upon scrolling down you will find the wp-config file.

Right-click on it and click Edit.

Copy and paste the following code into the file, preferable toward the end of the page.

define define 

With the code copied and pasted, Save Changes to the document and exit. But thats not all you still need to set up redirects.

Setting up redirects properly ensures that anyone that tries to access your website via the old URL will be redirected to the new one.

To do this, access and open your websites htaccess file.

Then paste the following code into it.

#Options +FollowSymLinksRewriteEngine onRewriteRule ^$ https://www.mynewdomain.COM/$1 

Like we did previously, replace mynewdomain.com with your new domain name.

These few lines of code will configure WordPress to redirect links appropriately.

Also Check: How To Get A .io Domain

Update Your WordPress Database

Next up, youll need to replace every instance of your old domain in your WordPress posts and pages with the new domain. This should fix any potential issues with internal links or files hosted on your site that reference the old domain name.

Thankfully, you can do this in one go by installing a suitable plugin that allows you to search and replace strings from your WordPress database. An example of such a plugin is the free and popular Better Search Replace extension.

After installing this plugin on your WordPress website, you can use the tool to search for references to your old domain and replace them with your new domain.

As were only interested in references to the old domain in posts and pages on your site , just select the wp_posts table .

Click the Run Search/Replace button. The first time you run the search and replace, the plugin will perform a dry run. A message will inform you of this, as well as tell you how many instances of the search term were found.

If youre happy with what you see uncheck the dry run box and click the Run Search/Replace button again.

Once youve run the search and replace for real, it’s time to move on to the last step in our guide on how to change the domain name of your membership site without destroying your SEO.

WordPress Switch Urls Same Server

WordPress  How to change/migrate domain name and site URL

Lately Ive had quite a few clients changing their domain names to retool their message or to entirely change their branding. It so happens that these websites are all on Hostgator but the procedure should be similar for any web host. There is information in the WordPress Codex > > Changing The Site URL which should not be ignored but they make it sound harder than it needs to be.

Important givens in my WordPress domain change scenario:

  • The new domain has to be already registered and DNS settings pointing to your web host.
  • Client indicates they are letting their old URLs expire eventually.That means the primary domain on the hosting account needs to be updated to the new URL. Do not count on your memory down the road to untangle it because the site will go down and you wont be able to get to WordPress easily , take care of it while you are thinking about it.
  • This is a simple domain switch Primary domain: www.domainABC to parked domain: www.domain123
  • WordPress is installed at the root directory and is a single installation, not MultiSite
  • The the old URL needs to work as long as it is not expired. Google will know the site as the old URL.
  • Take care of this task when you are not in a hurry and when there is low traffic on the website.

Go-time change your WordPress URL:

Best of luck to you. I hope this helps give you confidence in using the WordPress Address and Site Address fields.

Don’t Miss: How To Unlock Godaddy Domain For Wix

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.

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.

How To Change Your Domain Name: A Step

Whether youve been the proud registrant of your domain for one day, a few months or even several years, a change of heart may leave you wondering, How do I change the domain name of an existing website to a new one?.

Dont panic. Were here to help.

Maybe your dream domain name has recently become available, or youve decided to rebrand your website and need to buy a domain name thats more in line with your new look. Whatever the reason, there are steps to follow to ensure that the change wont affect your website, or your website visitors.

If youre a complete newbie to the world of domains or would like to brush up on your knowledge before we begin, start by reading our domain definition.

Ready? Lets begin.

Recommended Reading: How To Determine Who Owns A Domain

Setup A Permanent 301 Redirect

Now that youve successfully changed to your new WordPress domain name, but what if someone visits the old one? Will they just see a blank page? You dont want to lose even a single visitor. We recommend keeping your old domain active for a while to allow users and search engines time to recognize your new home.

But thats only a temporary solution. The long term fix to guarantee that no traffic gets lost during your rebranding efforts will be to set up a permanent 301 redirect from your old domain to the new. This will help you optimize your website for search engines and users alike by redirecting anyone who lands on your old website, sending them instead to your new one. Heres how:

  • Log into your cPanel
  • Click on the File Manager
  • Open your website folder.
  • Go to the .htaccess file and click on Edit.
  • Go to cPanel> Files> File Manager
  • Select your old domain and click Go to File Manager.
  • Find the .htaccess file in the public_html directory and right click it
  • Select Edit
  • Insert the following code, after replacing http://yoursitename.com with your new domain, then press Save & Close.

If you need to put the code in the wp-config file to change the site address or domain name, do the following:

  • Log into your WordPress Admin Dashboard
  • Navigate to Settings > General
  • Under general settings find two fields named WordPress Address URL and Site Address
  • Change the old domain name to the new one
  • Click Save Changes to finish the process.
  • Redirect The Old WordPress Domain To The New One

    How to Change Your Domain Name in WordPress 2018

    This step is a bit optional but highly recommended! You should also consider keeping your old domain active temporarily to allow users to find you if they are unaware of the domain change on your website and also to ensure that search engines recognize the redirect to your new one.

    This is an important step because it will help you maintain Google PageRank for your site, and your SEO work will not go to waste. To do this, well do a 301 redirect from the old domain to the new one.

    The 301 redirect can be created using the .htaccess file, which we can modify in the same way as we did with the config file:

    • Open the FileZilla FTP client .
    • Connect to your server using your FTP details.
    • Look for the .htaccess file in the public_html folder.
    • Right-click on the wp-config.php file and select Edit.
    • Insert the following code after replacing newdomain.net with your new domain.
    • Save the file and upload it again to your server to replace the existing file.
    • #Options + FollowSymLinks
    • RewriteRule ^ $ Http : //newdomain.net/$1

    Also Check: How Much Is A Domain Name

    Reasons That Are Responsible To Change Your WordPress Domain Name

    These are the reasons can you change your domain name in WordPress site:

    • You Are Going To Merge Various Properties Into A Single Domain Address.
    • You Need To Start From Scratch After Suffering From Any Major Penalty.
    • To Rebrand Your Business
    • You Are Considering Some Other Domain Extensions For Example, .Net,.In, .Or, .Org, etc.
    • Migrating From A Free Domain Name To The Paid One.

    Dont Forget To Backup Your Website Thoroughly

    Nothing is worse than losing your all-important content just because of one silly mistake. It is very important to have a complete backup before migrating your website to other domain names. There are hundreds of hosting options for WordPress are available but not everyone offers complete website backup which is quite crucial while choosing the right option for your website.

    There are many plugins available that will help you in backing up your website. Before you change the WordPress domain Cpanel makes sure to have a complete backup with all subdomain lists.

    Recommended Reading: How Much To Purchase A Domain Name

    Change Http To Https Extension

    To run a secure website over a search engine it is important to have a secure URL. If your website is running over HTTP then you should migrate it to HTTPS.

    This change will help you to survive on the browser securely and safely for the long term. This will not change your entire domain name it just improves your sites overall performance.

    Also, remember if your website already has HTTPS i.e SSL certificate then dont forget to place 301 redirects before migrating.

    Domain Name Site Url And Site Address: Whats The Difference

    How to Change WordPress Blog Domain Name

    Often times, people use domain name, site URL, and address interchangeably. In fact, if you noticed, in the introductory part of this article, we interchanged the terms at different points.

    Does it mean the three terms all mean the same thing? Not exactly.

    A domain is basically the address where your website lives on the internet. Now, your website may have several pages, posts, and files, it can only have one domain name.

    Think of your office address, for instance. The building might have different floors and rooms with unique IDs , it can only have one address .

    A URL, on the other hand, is the address/path to a specific page, post, or file on the internet. With the office example we used above, its more like the address to a particular room in the office building.

    For instance, take a look at this post on our blog: In this post, we explained how to perform a WordPress domain transfer from HTTP to HTTPS, by installing an SSL certificate.

    The URL to this post can be seen highlighted at the very top of the page, and it reads:

    If you copy this link to your web browser, you will specifically be taken to this post. Not the home page of the site or another page, but the post.

    Lastly, the site address is a generic name used to either refer to the domain name of a website, or a URL within the site.

    With that said, lets now see some of the techniques you can use for changing your domain name.

    You May Like: How Much Does A Domain Name Cost

    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.

    More articles

    Popular Articles