Note: The post has been linked from http://techinfozone.net by permission of the blog owner.
Description: In this blog i’ll explain how to transfer the site from my vps server to Host Gator Server having different ssh port and shared account. Follow the steps which are mention below.
Step 1: Backup the WordPress database.
1) If you have installed the phpmyadmin on vps. Open the phpmyadmin and Click on the name of the database of the wordpress blog.
2) Then export the database.
3) Then click go button.
4) When it is completed save the file name database.zip or database.tar.gz in local download folder.
Step 2: Transferred Your Site files system on the Host Gator Server.
1) Login to your server through ssh root@serverip then password.
1.a Now zip the files where the document root of the site exist. e.g: /var/www/html/myblog
Command to run: tar -zcvf myblog.tar.gz myblog
2) Now copy the zip file in ~/public_html/domainname through command:
You have to use scp command to transfer the data on the server.
If you have error of port 22 not open on destination and
scp myblog.tar.gz myname@serverip:/mydirectory/ is not working.
Following are the Limitations for server:
1. My server ssh port is not 22 and it is 2222
2. The destination server which SSH port is 2222 is shared server with cpanel access. How do I will transfer through IP. It will not work for me.
3. I will have to use scp port 2222 and instead of user@ipofserver i will use user@clientname.
# scp -P2222 myblog.tar.gz root@clientname:~/public_html/domainname
3) Change the database name , user name and password in wp-config.php file.
Step 3: Import the database in phpmyadmin:
1) Click on the import button in phpmyadmin.
2) Choose the file from local and click on the go button in phpmyadmin.
3) Change the URL in wp-option table, save it.