0

I want to put a website online. I worked it on a localhost basis, through my, and only mine, computer and wish to move it to a Linux 10.0 Server. Can anybody give me the directions to successfuly put the website online? Which files do I have copy to the server, what do I have to do, do I have to use lampp, etc.

Another thing, is there a way to work from a laptop and access the server to continue working on the website?

Thanks in advance.

1 Answers1

0

1 Copy site file(php scripts, images and config) from your computer to server. You may use sftp or ftp:

comp$ cd /path_to_site
comp /path_to_site$ tar -zcvf ~/site_to_move.tar.gz ./
comp$ cd ~
comp$ scp site_to_move.tar.gz user@server_host_or_ip:
comp$ ssh user@server_host_or_ip
server$ tar -zxvf site_to_move.tar.gz -C /path_to_server_site

2 Copy MySQL database. For dump, use mysqldump or phpmyadmin. Before export DB, check whether such a database on a server

comp$ cd ~
comp$ mysqldump -u DB_USER -p --add-drop-database --databases DB_NAME > site_db.sql
comp$ scp site_db.sql user@server_host_or_ip:
comp$ ssh user@server_host_or_ip
server$ mysql -u root -p < site_db.sql
mysql> GRANT ALL ON DB_NAME.* TO DB_USER@'localhost' IDENTIFIED BY 'DB_PASSWORD';

3 Configure Apache or other web server.

4 Test site.

alvosu
  • 8,437
  • 25
  • 22
  • It's from Windows to Linux, by the way. And I can't find the default folders such as www (to put Joomla) and var/bin for the DB. The thing is this server is very old and already has 1 website running on it. – dendroaspis Feb 03 '11 at 12:46