Saturday, September 24, 2022

How To Change WordPress Domain

Don't Miss

Getting A New Domain For A Self

How to Change Your Domain Name in WordPress 2018

There are various reasons as to why you might want to connect an independently hosted WordPress website to a new web address. You can do this manually, by setting up the new domain over the wp-config.php file, but this process can lead to problems with WordPress settings, themes, and widgets.

To avoid these problems, you can change the domain via the WordPress database with a plugin designed for that specific purpose such as Duplicator or WP Migrate DB. The latter option is also available in four pro versions. These pre-tools enable a swift and pain-free move at various rates to suit a range of budgets, but its only worth the investment if you regularly need to transfer or change your domain. In most cases, the two free plugins and other WordPress extensions are perfectly sufficient.

In addition to these changes on the WordPress database, its also necessary to make adjustments with your hosting provider. You should ensure your new domain is connected to the WordPress folder on your server, and that you have set up an automatic redirection from your old web address to your new one. Read more about this in our guide to URL redirections.

Update The Database Tables

Once the domain is working, and you can log in to the WordPress Dashboard of the new site, install the Search and Replace plugin. It will allow you to search all of the database tables, 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 links hardcoded into widgets, etc. Those links will need to be manually edited to reference your new site address.

For additional information on using this plugin, please review the following article:

  • Log in to your WordPress Dashboard.
  • In the left navigation menu, go to Settings and click General.
  • Be sure that each of the following fields displays your new domain name and not the old one:

    • WordPress Address

    HostGator Website Transfers

    HostGator is committed to making it easy to transfer your site to your new hosting account. We can transfer website files, databases, scripts, and one free domain registration transfer.

    What qualifies me for a free transfer?

    HostGator provides free transfers for new accounts within 30 days of sign-up, and to newly upgraded accounts. For upgraded accounts it must be an inter-server upgrade to qualify. Please note that downgraded accounts do not qualify for free transfers.

    Depending on which type of account you sign up for, we offer differing numbers of free transfers. Please refer to the chart below to see what we include for new packages.

    Unmetered Web Hosting

    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.

    Recommended Reading: How To Tell Who Owns A Domain Name

    Changing The Config File #changing The Config File

    You will need to update your WordPress configuration file if your database has moved or changed in certain ways.

  • You will only need to modify the config file if:
  • your database has moved to another server and is not running on your localhost
  • you have renamed your database
  • you have changed the database user name
  • Make a backup copy of your wp-config.php file.
  • Open the wp-config.php file in a text editor.
  • Review its contents. In particular, you are looking for the database host entry.
  • Save the file.
  • How To Change WordPress Site Address

    How to Change WordPress Blog Domain Name

    NOTE:backupthis guideadmin dashboardvia the databaseWordPress admin dashboardSettingsGeneralWordPress Address Site Address via the databasename of your database Databases phpMyAdmin+siteurl home option_valueNOTE:update all linksFile Managerwp-config.phpViewEditFilesBackup.sqlCtrl + FReplaceFindReplaceReplace AllDatabasesMySQL Databasesspecified in this guidephpMyAdminDatabasesImportBrowse .sqlNOTE:this guidewp-config.php

    • define ‘DB_NAME’ line the name of the new database you’ve created in MySQL Databases menu.
    • define ‘DB_USER’ line the name of the new user you you’ve created in MySQL Databases menu.
    • define ‘DB_PASSWORD’ line the new password you’ve set for database user in MySQL Databases menu.

    SettingsPermalinksPost namePlainwp-config.phpViewFilesBackups.sqlCtrl + FReplaceReplace AllDatabasesMySQL DatabasesphpMyAdminDatabasesImportBrowse .sqlNOTE:wp-config.php

    • define ‘DB_NAME’ line the name of the new database you’ve created in MySQL Databases menu.
    • define ‘DB_USER’ line the name of the new user you you’ve created in MySQL Databases menu.
    • define ‘DB_PASSWORD’ line the new password you’ve set for database user in MySQL Databases menu.

    SettingsPermalinksPost namePlain

    You May Like: How To Get Business Domain Email

    Take Advantage Of The Diverse Possibilities For Changing Domains And Providers

    The two different versions of WordPress mean there is a wide selection of WordPress domain transfer options. Since WordPress is the worlds most used CMS, developers have also created a host of plugins for dealing with a domain change in every possible scenario. At IONOS youll always find the right Managed WordPress Hosting package whatever your needs. In addition to the many advantages of WordPress itself, youll benefit from around the clock technical support so that you can fully concentrate on blogging.

    Thanks to the range of plugins and methods at hand, there is a solution for every user and their unique set of circumstances. The easy-to-use plugins can help beginners get their projects off the ground, whereas more experienced users can opt for more complex extensions or a manual set-up. Since the WordPress community is so enormous, users can trust that the various migration plugins will be kept up-to-date. Thus, you can rely on always having a great range of tools for easily transferring or changing your WordPress domain.

    Managed WordPress Hosting with IONOS!

    Start your website quickly and benefit from the most secure and up-to-date version of WordPress!

    Domain

    Verify The Profile #verify The Profile

  • In your Administration > Settings > General panel, you will verify that the changes you made in Changing the URL above, are correct.
  • Verify that the reference in your WordPress Address contains the new address.
  • Verify that the reference in your Site Address contains the new address.
  • If you have made changes, click Save Changes.
  • Recommended Reading: How To Transfer Squarespace Domain To Godaddy

    Best Way To Change WordPress Domain Or Url Address

    Probably modification the WordPress domain or site URL from its database is the best method to do that. Although it is not the easiest fix. Almost all good WordPress hosting services offer phpMyAdmin for customers to manage WordPress databases. You need to connect to your WordPress database using phpMyAdmin, then open its wp_options table to update WordPress URL or domain from there.

    Note that you will need to update the WordPress site URL from both the siteurl and home entries in the database. You can find more details from previous linked article.

    Option : First Try Changing The Necessary Values For The Url Switch From The WordPress Dashboard If You Are Able To Gain Access

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

    Many times a simple change can take care of the URL switch. If you have access to your WordPress dashboard, you may be able to make the change to the URL right in there. If so, head to Settings> > General. Then modify the WordPress Address and Site Address values appropriately. Unless installing WordPress into a subfolder, these values are generally set the same.

    Recommended Reading: What Is The Io Domain Used For

    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.

    Why Migrate From WordPresscom To WordPressorg

    WordPress.com is a fully managed platform which means its easier to manage but youre limited in what you can do to grow your website.

    WordPress.org is a fully featured content management system. Aside from giving you full control over your blog, WordPress.org lets you customize the look and feel of your blog the way you want, monetize it however you like, add third-party tracking including Google Analytics, and a lot more.

    Heres what you can expect when you switch to WordPress.org:

    • Free website builder. All you need to pay for is a domain name and web hosting
    • Fully customizable site with access to wp-admin dashboard and control panel
    • Create any site you want including online stores
    • Access to thousands of stunning WordPress themes and plugins to give your site a professional look and feel.
    • Monetize your site with advertising, affiliate marketing, sponsored WordPress blog posts, and more

    Ready to migrate your blog to WordPress.org? Lets get started.

    You May Like: Where To Sell Domain Names For Profit

    Changing The Home And Siteurl Fields In Phpmyadmin

    The following section is also available as an instructional video:

  • Open phpMyAdmin.
  • Locate the siteurl and home rows. Click the pencil icon next to each to edit.
    When you scroll over these options, “browse” will appear.
  • Alter the URL by typing in a new one.
  • Click the Go button to save the settings. Do this for both the siteurl and home options.
  • You should now be able to log into your site at example.com/wp-login.php.

    Implement 301 Redirects In Htaccess

    How to change WordPress admin password?

    The next step in moving your site to HTTPS is setting up a redirect that sends visitors automatically over to the secure version. For that, we will use .htaccess. This is the name of an important system file on your server .

    It usually contains settings for using pretty permalinks, so your installation probably already has one. To find it, make sure to allow your FTP client to show hidden files because .htaccess is invisible by default. If you dont have one, just create a plain text file, rename it to .htaccess and upload it to the WordPress root directory.

    After that, add the following lines to it:

    < IfModule mod_rewrite.c> RewriteEngine OnRewriteCond % offRewriteRule ^$ https://%% < /IfModule> 

    Thats it. From now on, visitors should automatically land on the HTTPS version of your WordPress site. Make sure no page is available in both versions. This can lead to problems with duplicate content. Not good for SEO.

    Also Check: Io Vs Com Domain

    Copy Files To The New Domain

    To add a new domain, go to cPanel > Addon Domains then complete the following steps to copy files to your new domain.

  • From the cPanel homepage, open File Manager.
  • Open the public_html folder.
  • Along the top of the screen, click Select all.
  • Press and hold the Ctrl key while clicking the following folders in your public_html folder:
    • .qidb
    • cgi-bin
    • addon domain folder
  • 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
  • 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
  • Click Copy File.
  • 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

    Don’t Miss: Domain Registration Cost Per Year

    WordPress Best Practices To Follow After Site Migration

    Now that youve completed transferring your WordPress.com site to WordPress.org, the next thing you want to do is follow WordPress best practices to keep your website secure and grow your audience on the self-hosted WordPress platform.

    Before you choose a random free theme for your site, take a look at our list of top WordPress themes and decide which one would be the best choice for your needs.

    Upon migration, below are a few things you need to do immediately on your new WordPress website. There are plugins that take care of most of these tasks for you. Heres what we recommend:

    And with that, youre all set to run your website on WordPress.org. Before we wrap up, well answer questions we get asked quite often.

    Change Your Url Within WordPress

    CHANGE the DOMAIN NAME on your SITEGROUND WordPress Website

    Your first task is to physically change your sites URL within WordPress. However, this step comes with a word of warning. Once you save your changes, your sites back end wont be accessible until youve completed the rest of this procedure.

    To begin, log into WordPress, and navigate to the General > Settings screen:

    This screen contains global settings for your WordPress site. The fields were interested in are WordPress Address and Site Address :

    To change your URL, simply type the new address into both of these fields, and click on Save Changes. As we mentioned, this will make your site temporarily inaccessible.

    You May Like: How Much Should A Domain Name Cost Per Year

    Option : Hard Coding The Change In Wp

    If you cannot access the WordPress dashboard, these values can be hardcoded into the wp-config.php file. This file will exist in the root of the WordPress installation. It can be downloaded by FTP . Depending on the tool used, it might be able to be modified directly. Create a backup somewhere before modifying. This approach isnt ideal as it makes it so the values found on the General Settings have no meaning. The values, if existing in the wp-config.php file will take precedence. At any rate, if it is necessary, use the following commands to change the values.

    define define 

    More articles

    Popular Articles