Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm a bit of a Linux noob. I've been developing a PHP/MySQL project on my localhost. My system is running Windows 7 and I used xammp to install PHP5 and MySQL. I've also been saving updates to a svn repository that's being hosted at a commercial site.

I now need to move my project to an external server that's running Ubuntu but I'm not sure how to do that. I have all the credentials and am able to use Putty to SSH into the external server, and the server already has LAMP installed. I know this sounds pretty ditzy, but I'm not sure where to go from here. I'm not sure how to move my project from my local machine to this server.

share|improve this question

migrated from Jul 14 '11 at 19:38

This question came from our site for professional and enthusiast programmers.

3 Answers 3

If the external server has a LAMP stack (and is fully functional), then it appears the question you are asking is:

a) How to transfer files to the server:

For this, my recommendation is WinSCP to transfer the files. You will use your SSH password/key and username (exactly as you would for PuTTY) and it will log you into the server. You can just drag files into the right folder. The advantage of this is that if you don't have an FTP server running on your server it will still work. (If you do have an FTP server running, this still offers better security, but FTP may be easier to use).

b) Where to put the files:

This is a bit harder to answer. Typically website files are placed in /var/www/html however, some setups place them in the user's home folder (and symlink them elsewhere) or put them in a completely different directory. If you use FTP (and someone else has set it up) you will typically be brought right to the folder you need to put your files in. Otherwise, it is quite dependent on your setup (look in httpd.conf (/etc/httpd/conf/httpd.conf) for the clues as to where Apache expects the files - that is a bit beyond the scope of this question/answer.

c) If you are looking for moving and/or using your SVN repository:

You may be able to mirror the repository, depending on how it has been setup. You might also simply download a working copy of the repository to the correct directory (depending on the setup, you might even be able to use a post-commit hook to automatically update the site when you commit changes to the repository, but the merit of that is debatable).

d) Databases:

You probably have databases, to copy them over either create a dump (using mysqldump) and then import into your database; or simpler (if a bit slower) use phpMyAdmin for a graphical interface to your database. (Your remote server might not have phpMyAdmin - depending again on the setup).

share|improve this answer

It's not quite clear what do you mean by do that. If you would like to install Apache, PHP and MySQL on your linux box, there are plenty of tutorials available on the web. But you have to know some basic linux commands and to be familiar with linux console.

Here is a well-documented tutorial you may follow but again, after gaining some experience with linux boxes.

Also you may want to check xampp for linux:

Good luck.

share|improve this answer

For just moving the files over, the simplest answer would be to install/setup an ftp server. Most Ubuntu distributions should come with vsftpd by default (pretty sure). Otherwise if not type:

sudo apt-get install vsftpd

Assuming you won't need to allow any ports in your firewall settings you are essentially done. The only thing you need to do is make sure the daemon is running:

sudo service vsftpd start

Get an ftp client (Filezilla is simple, free, available for Windows) and login with the same credentials/info you used to SSH into the box (except the port will be port 21). If the username you use to login to the machine is root you will need to create a normal user first (vsftpd will not allow root login as I recall) and then use that username/password. It would eventually be recommended you configure the ftpd to run ftps so your username/password and data transfers are secured.

share|improve this answer
Sorry, -1 for recommending an FTP server. If ssh is already installed, Filezilla etc can perfectly use sftp for transferring files in a secure manner. –  Janne Pikkarainen Jul 15 '11 at 6:52
Forgot about sftp, pretty harsh downvote though :( –  Nicholi Jul 15 '11 at 18:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.