Thursday 28 April 2011

HOW TO COPY WEBSITE

------------

HOW TO COPY WEBSITE FROM:- http://abc.com/ to abc1.com with database

------------

**Steps are as follows :--

. Open two shells ( one with abc.com and other abc1.com )

. then copy public_html of abc.com to abc1.com

. go to public_html folder of abc.com and hit the command

. [root@server public_html of abc.com]# cp -R * /home/abc1/public_html

. Change the ownership of the files copied under public_html of abc1.com

 Then take backup of mysql datatbase of abc.com

mysqldump abc_databasename > abc_databasename.sql   ( of abc.com)

Create a new database and username under abc1.com ( add user to database, make a note of db name, user & password)

then go to Shell and enter the following command :--

mysql -u abc1_user -ppassword abc1_databasename < abc_databasename.sql

Then go to the configuration file and do the changes accordingly.

And your site has been copied with database  to new site.

Enjoye now...

No comments:

Post a Comment