Transferring your local site to the web server

Share

If you have access on the web server to the MySQL folder (NOTE: this will generally not be accessible on a web server that is not owned by your company) you can do the following to transfer the local database used by your site to the web server:

* Click on each image to enlarge it
  1. Browse to the MySQL database used by your site (i.e. database named MySite), This is located in the folder /bin/MySQL/data/
  2. Zip the database and FTP the file to the web server
  3. Once transferred, unzip the file into the folder
  4. If you do not have access to the MySQL folder on the web server you will need to do the following to export the local database data:

    Exporting the local data as SQL

  5. phpMyAdmin (http://localhost/phpmyadmin
  6. Select your site database from the databases dropdown on the left
  7. Click on the Export link. From the resulting screen leave the default settings but also select the checkboxes for Add DROP TABLE / DROP VIEW and Add IF NOT EXISTS in the Structure section. Joomla 1.5.x Exporting Data Image
  8. Click on Go
  9. A window will load containing the generated SQL. You need to copy/paste this SQL into a text file and save with the extension of .SQL (i.e. database.sql). This file must be uploaded to the web server, as it must be called when importing the data into the live database.
  10. Importing the SQL on the web server

  11. Using phpMyAdmin on the web server, create a new blank database to be used by the live site. Give it a suitable name (i.e. the same as the local database name, or you will need to change the configuration.php file if the database name differs from your local database name). For the purposes of this tutorial, we will use the name MySite. Simply enter the database name and leave all other settings to the default values. Click on Create.
  12. On the resulting screen, click on Import. Joomla 1.5.x Importing Data Image
  13. Browse to the location of the SQL file (i.e. database.sql). Leave all others settings to the default values and click on Go. Joomla 1.5.x Importing Data Image
  14. When the data has been successfully imported, you will be alerted with the message Import has been successfully finished, xxx queries executed. Joomla 1.5.x Importing Data Image
  15. The contents of the local Joomla install (i.e. contents of folder MySite) now need to the zipped and transferred to the web server. (screenshot)
  16. Once transferred, unzip the contents into the root of the Joomla install on the web server. Remember to overwrite all existing files on the server. (screenshot)
  17. You need to amend file configuration.php (found in the root of the Joomla install) as this will currently contain settings used by your local site. The settings to be changed are:
    • var $log_path
    • var $tmp_path
    • var $host
    • var $db
    • var $user
    • var $password