Copying a Joomla website
From Joomla! Documentation
Revision as of 11:24, 19 January 2008 by Neriv
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.
Copying the files
Copying the database
There a multiple methods to copying your Joomla database and moving it to a 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 firstname.lastname@example.org:/backup
Restore database at remote server (login over ssh): $ mysql -u user -p db-name < db-name.out
The phpMyAdmin tool can be used to export and import a database, providing a simple way to duplicate a copy of a database using a different name on our servers.
Exporting a copy of the database to your computer
1. Login to the database that you want to duplicate using phpMyAdmin 2. Click the database name on the left-hand side of the page. 3. Select the Export tab 4. Select the Save as file option 5. Click Go
You'll then be prompted to save the database file on your personal computer.
Importing the copy into a new database
You'll first need to create the new, empty database on our servers using the account control panel. After the new database has been created:
1. Login to the new database using phpMyAdmin 2. Click the database name on the left-hand side of the page 3. Select the Import tab 4. Click the Browse button under "File to import", then select the database file from your computer 5. Click Go to import the database
(Hint: If you see a "No database selected" error, it's probably because you forgot to first click on the database name in the left-hand column.)