In this tutorial we will learn how to move your website from one domain to another.
1. Log in to your WordPress site. Go to the Administration > Settings > General panel.
2. In the box for WordPress address (URI): change the address to the new location of your main WordPress core files.
3. In the box for Site address (URL): change the address to the new location, which should match the WordPress (your public site) address (URI).
4. Click Save Changes.
Do not try to open/view your blog now.
5. Move your WordPress core files to the new location.
6. As part of the WordPress installation, you must modify the wp-config.php file to define the WordPress configuration settings required to access your MySQL database.
7. To change the wp-config.php file, you will need this information:
- Database Name
Database Name used by WordPress
- Database Username
Username used to access Database
- Database Password
Password used by Username to access Database
- Database Host
The hostname of your Database Server.
8. Open wp-config.php file and change database name, hostname, user and password:
define('DB_USER', 'wrd_exampleuser'); define('DB_PASSWORD', '123456789'); define('DB_HOST', 'localhost');
9. Login to PhPmyAdmin tool and export the database (of the existing website).
10. Login to PhPmyAdmin tool and import the exported database to a newly created database.
11. Now, try to open your site on a new hosting / domain.
Note: If you are using custom Permalinks, go to the Administration > Settings > Permalinks panel and update your Permalink structure to your .htaccess file, which should be in the same directory as the main index.php file.
Existing image/media links uploaded media will refer to the old folder and must be updated with the new location. You can do this with a search and replace tool, or manually in your SQL database
Feel free to check the detailed video tutorial below:WordPress. How to move your website from one domain to another,