Migrating wordpress/classipress installation to new-server (fastest way)
Ok here is simple tutorial to transfer you website from one host to second host
I am assuming that you are in ssh-console of your old server
I am not responsible if it will break your site, burn your server, move you into sky or make you cry.
Ok to accomplish our task first we have to do two things:
1.Compressing up our files
2.Backing up our old database
So first thing first, to compress your files enter this command in your old server ssh-console.
To tar or compressing: www/ directory
Code:
someuser@oldserver ~$ tar -pczf filename.tar.gz www/
So next part is backing up your mysql database, I am assuming that you are in ssh console of your old server.
Type this command to backup your mysql database
Code:
someuser@oldserver ~$ [/codemysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]]
[uname] Your database username
[pass] The password for your database (note there is no space between -p and the password)
[dbname] The name of your database
[backupfile.sql] The filename for your database backup
[--opt] The mysqldump option
For example, to backup a database named 'classipress' with the username 'root' and with '123456' password to a file bk_classipress.sql, you should accomplish this command:
Code:
someuser@oldserver ~$ mysqldump -u root -p123456 classipress > bk_classipress.sql
Ok now we have two file one is compressed /www directory and our database backup. So now we are going to transfer
these files to second server.
To transfer our compressed /www directory named filename.tar.gz enter this command:
Code:
someuser@oldserver ~$ scp filename.tar.gz yourusername@newserver:/www/
you can specify your own path
to transfer mysqldump file named bk_classipress.sql enter this command:
Code:
someuser@oldserver ~$ scp bk_classipress.sql yourusername@newserver:/home/username/
Ok now your files are copied so login in to new server ssh-shell to extract files and restore your backup.
To re-create the old classipress database you should follow two steps:
1.Create an appropriately named database on the target machine
2.Load the file using the mysql command
To create database type this command
Code:
someuser@newserver ~$ mysqladmin -h hostname -u root -ppassword create classipressnew
where 'hostname' is your database server host in most of the case it would be 'localhost' so just type 'localhost'
Have a look how you can restore your bk_classipress.sql file to the 'classipressnew' database.
Code:
someuser@newserver ~$ mysql -u root -p classipressnew < bk_classipress.sql
Ok now we are going to extract our compressed file filename.tar.gz
Code:
someuser@newserver ~$ tar xvfz filename.tar.gz
Ok we have now restored our database and files on new server. Just update your
wp-config.php with new credentials to finish this.
I you like this tutorial share your experience.
Thanks to spymare for motivating me to write this tutorial.
Alternate tutorial via spymare
http://forums.appthemes.com/wordpres...n-guide-19089/