There are different ways to move your WordPress® blog between servers. You should only use this method if you want to change the domain name your WordPress blog is hosted on while you are moving the site to a new server or host.
To get started, you need to set up WordPress on your hosting account. Once WordPress is set up, you need to export your existing blog and database, and then import it along with the database on to the new server. Finally, to complete the process, you need to update your wp-config.php file and repair any broken links on your site.
To export and download WordPress blogs from your current host, you need to back up your existing database and have access to the WordPress files on your existing server.
To import and upload your WordPress blog to our servers, you need to access the new hosting server and database.
SQL file you saved into your new database.To make your site work again, you need to update the wp-config.php file with your new domain name.
wp-config.php file.define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');
/** MySQL database username */
define('DB_USER', 'usernamehere');
/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');
/** MySQL hostname */
define('DB_HOST', 'localhost');
putyourdbnamehere is your MySQL Database Nameusernamehere is your MySQL Database Nameyourpasswordhere is your MySQL Passwordlocalhost is your MySQL Host NameFinally, you need to clean your site of outdated link paths.
wp-config.php file, and remove the following two lines:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Note: As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Third-party marks and logos are registered trademarks of their respective owners. All rights reserved.
Article ID: 1275
Created On: Tue, Nov 17, 2020 at 8:18 PM
Last Updated On: Tue, Nov 17, 2020 at 8:18 PM
Online URL: https://www.heartinternet.uk/support/article/changing-your-wordpress-domain-name-while-moving-your-site-to-a-new-location.html