I have developed a PHP MySQL website locally on XAMPP and have been asked to put it on a remote Apache server. I have been give an ip address that directs me to an “index of/” page, and also Ubuntu username and password details, along with MySQL login details. Can someone give me some instruction on how I should go about, first getting login and second getting the local files to the remote server. Thanks.
Asked
Active
Viewed 2,051 times
-2
-
1[use ssh to connect to the server](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-to-connect-to-a-remote-server-in-ubuntu) using the ubuntu credentials, [upload the files with scp](http://stackoverflow.com/questions/5946529/scp-command-syntax-for-copying-a-folder-from-local-machie-to-a-remote-server), [set up a virtual host](https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts) entry for your site, make sure the db credentials match what you got for the server, make sure file permissions are ok, restart apache – JimL Jul 09 '16 at 10:46
-
1FYI - There's this site for questions like this http://askubuntu.com/ – Alon Eitan Jul 09 '16 at 11:23
2 Answers
2
use winscp to connect to server over sftp. then
- browse the web root, usually its /var/www/ or /var/www/html than upload files there.
- create mysql database and upload database , if mysql doesn't exist install it and phpmyadmin
- set database credentials and test website. https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

abhirathore2006
- 3,317
- 1
- 25
- 29
-
Thanks, I managed to get access to /var/www/html via winscp, and got the site files onto the server, but how do I go about creating or importing the database onto the remote server now?? – ballbern Jul 10 '16 at 11:50
-
you need to access the server via ssh and install the mysql if not yet installed , than install the phpmyadmin , installing phpmyadmin will reuire database admin password which you create when you install mysql. then you can create and manage the Databases using phpmyadmin as you do in xampp . url will be yourwebsite.com/phpmyadmin – abhirathore2006 Jul 11 '16 at 08:11
1
You can use WinSCP to connect to your server using SSH credentials and upload your website files to Apache root folder. Usually it's /var/www on Ubuntu Linux systems.
Then you need to copy your MySQL database to the server. I can suggest you to login to the server using Putty and install PHPMyAdmin first:
apt-get install phpmyadmin
After that you can access it with http://your-server-ip/phpmyadmin Export your MySQL database locally and import it on the server. That's it.

Tim Connor
- 97
- 2