Move Wordpress site to another server with different domain name
Most of the time, we move live site to a testing environment to do some tests. Here is how to do it. Assumptions: 1. Source and Target servers are using linux ubuntu OS. 2. Webserver settings are already configured. Steps: Source Server: 1. Create a compressed copy of your website code. tar -zcvf <location_of_target_file>.tar.gz <website_code> eg. t ar -zcvf /tmp/bacukup.tar.gz /home/avtar/www/* 2. Take database backup. Here I am assuming you are using mysql on same server as database. mysqldump -h <hostname> -uroot -p ><location_of_backup_file> eg. mysqldump -h localhost -u root -p wp_db>/tmp/db_backup.sql 3. Compress the db backup file. tar -zcvf <target_file_name>.tar.gz <db_backupfile_location> eg. tar -zcvf /tmp/db_backup.tar.gz /tmp/db_backup.sql 4. ...