I have a Wordpress site with hostagator web hosting , I am buying new domain and want to use new domain for site but same existing developed site. How to backup existing site and then restore to new domain ?
There are a lot of ways of doing that. You can search a lot of materials on Internet but I would advise you to use this tool because I used in the past and it's reliable and very straightforward.
It is called Duplicator and is a wordpress plugin solution: https://wordpress.org/plugins/duplicator/
Consider to maintain your site active until your new site is working properly. I hope I could help you. Regards.
Just install WP migrate db plug-in in your current website. And export the database with your new URL. Then create a new database in your server and import the updated SQL file. Then edit your config.php with new database details. Finally point your new domian to this server **should take complete backup (both files and databse) before making the above changes **
Solution is here
after searching a lot i got one simple solution. Using Duplicator plugins or any other tool is either difficult or paid.
My simple solution is as follows
- Backup and download all data from public html folder
- Download the SQL database associated with the wordpress site.(in phpMyadmin you will find option of export database.)
- Now upload the same files of public html folder to the public html folder of new hosting.
create a database with same name and import the tables from the downloaded SQL database.(in phpMyadmin you will find option of import.)
Now check the site if the domain is not changed
If you are changing domain name too by keeping the website same you need to follow few more steps
Download and place the interconnet/it tool in public html folder and follow the steps in documentation to use this tool.
case1- you are transferring site from one domain to another
if you are transferring from abc.com to xyz.com ins search and replace tool replace abc.com string with xyz.com .
case2- if you are changing the names only in website
if you are keeping the domain same but changing name of site e.g. ABC Technologies to XYZ technologies . Then replace ABC to XYZ
You can use this tool as per your need as it is applicable for database too.
来源:https://stackoverflow.com/questions/41918300/migrating-wordpress-site-to-new-domain