Vcoderz Community

Vcoderz Community (http://forum.vcoderz.com/index.php)
-   Computers & Information Technologies (http://forum.vcoderz.com/forumdisplay.php?f=6)
-   -   Move a site to a new server (http://forum.vcoderz.com/showthread.php?t=18830)

RUSSIAN 07-26-2010 10:45 AM

Move a site to a new server
 
Hay all!
I need to move my site to a new server (one with unix installed). I can SSH to this server as a root. On the other one I have a site. I can only FTP to it.
So I want to move all folders & files from the old server to the new one without stupid downloading to my PC and then uploading to the server all that stuff. How to do that?

Sheriff Ice 07-26-2010 12:23 PM

zip the files/folders and download the compressed file from one server to another

Google 07-26-2010 01:25 PM

On the server where you have SSH access
Put the website in a tar file:
Code:

tar -czvf /tmp/webisteFile.tar /var/www/websiteFolder/


On the server where you have FTP access
Upload the websiteFile.tar and the create a php script with the following content:
Code:

<?php
system("tar -xf websiteFile.tar");
echo "finished!";
?>


Put this script in the same directory as where you uploaded the tar file, and then execute it by accessing it through the web browser.


xcoder 07-26-2010 01:46 PM

Just copy the whole website through FTP, you don't even need to compress especially if your host doesn't support gzip or tar.

FTP the new host
We'll take vcoderz as an example
Open SSH and type these.

1 - cd /var/www/html/oldwebsite/
2 - ftp
3 - open vcoderz.com
4 - put username and password
5 - cd /var/www/html/newwebsite/
6 - prompt (to turn off prompt confirmation for each file transfer)
7 - mget *

RUSSIAN 07-26-2010 04:13 PM

Thank you all, I now will try xcoder's solution.


All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger