This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section
Copying a Joomla! website is a two-part process: you must copy the files and you must copy the database (which is where the content is stored). Copying the files and copying the database are separate operations. Which you carry out first will depend on your particular circumstances but in most cases it does not really matter. If your website is being updated frequently and you need to take your website offline while the copy takes place then you will probably want to perform the database copy last so as to minimize downtime.
There a multiple methods to copying your Joomla database and moving it to live server environment.
MySQL COMMAND LINE METHOD
Usually you run mysqldump to create database copy: $ mysqldump -u user -p db-name > db-name.out
Copy db-name.out file using sftp/ssh to remote MySQL server: $ scp db-name.out email@example.com:/backup
Restore database at remote server (login over ssh): $ mysql -u user -p db-name < db-name.out