| How do you copy a site from localhost to a remote host? |
|
|
|
|
When you are first trying out Joomla!, it is often recommended that you install it on your local system. (e.g., "localhost"), for example with XAMPP, and get your site running locally. Eventually you may want to copy this site to your remote host. Fortunately, this is easy to do. This article assumes you have installed Joomla! 1.5 on your local computer, you have created a website and you now wish to copy this website to your remote host. Here are the steps:
Create a Place on Your Remote Host to Install Joomla!If this is a new site, it will just be your home directory. If you have an existing site, for example www.domain.com, that you wish to keep while you work with Joomla!, you may be able to create a subdomain, for example, www.domain.com/subdirectory to hold your Joomla! site. Copy Files and Directories of Your Local Joomla Directory to the Remote HostYou have two methods:
Upload all Files by FTPNormally, the easiest way to copy these files is using an FTP client program, such as Filezilla. Select all files from directory localhost (with XAMPP, the directory will be xampp/www/directory) and upload to the remote host HTML directory for a domain, or to the remote host HTML subdirectory.
Upload a Compressed FileCopying a large number of individual files using FTP can sometimes be unreliable. If you have command-line access to the both source and destination systems you can create a compressed archive file containing all the files on the source system, then transfer that single file to the destination system where it can be decompressed.
On Unix-style systems (eg. Linux) you can use the gzip program to create .zip files, or the tar program to create .tar.gz or .tar.bz2 files. For detailed instructions type man gzip or man tar at the command line. For example, tar cvfz joomlabackup.tar.gz /path-to-joomla will create a gzip-compressed archive file, called joomlabackup.tar.gz, containing all the files in your Joomla! installation. Important note! You need to make sure you are NOT in the folder you are trying to backup when you run the tar command or you will create an endless loop.
Having copied the archive file to the destination system, you now need to unpack it. Use the equivalent command that you used to create the archive file. For example, to unpack the archive file created in the example above, enter cd /path-to-joomla If the user or group IDs are not the same between the source and destination systems, then you will need to amend the ownership of the files you just extracted. For example, on an Apache system, you might need to enter the command cd /path-to-joomla Copy the Contents of Your Local MySQL Database to the Host MySQL DatabaseIn Joomla!, all the contents of the site (articles, menus, users, and so on) are stored in the MySql database. You need to copy this information to the host database. This is done by creating an export file on your local system and then importing this file into your host MySQL database, as follows:
At this point you have installed the database. If you want to create a database copy, you can use also the MYSQL command line method. Usually you run mysqldump to create a 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 This e-mail address is being protected from spambots. You need JavaScript enabled to view it :/backup Restore database at remote server (login over ssh): $ mysql -u user -p db-name < db-name.out Configure the Site. Edit the configuration.php FileManually edit "configuration.php" to tell Joomla! about your site. The file configuration.php contains settings specific to your system. This file was created for you when you installed Joomla! on your localhost. The settings in the configuration.php file that you typically need to change are shown below. This example is from a Windows XP localhost system. var $log_path = 'C:\\xampp\\htdocs\\joomla15\\logs'; Now, at you remote host system, the settings in the configuration.php file that you typically need to change are shown below var $log_path = '/var/www/vhost/domain.com/home/html/logs'; If you uploaded Joomla! files to a subdirectory, remember that you are working on subdirectory, and the settings that you need, will be, var $log_path = '/var/www/vhost/domain.com/subdirectory/html/logs'; At this point, your Joomla! Website on your host should be operational with the same information as your localhost site. If you installed it on a subdirectory, navigate to that subdirectory to see or administer the site. http://www.domain.com/subdirectory (for navigatation to the site) http://www.domain.com/subdirectory/administrator (login to the Joomla admin area with your user and password that your had at your localhost installed) and if you installed it on root directory to see the site http://www.domain.com/ (for navigatation to the site) http://www.domain.com/administrator (login to admin area) |
New Joomla Templates
Social ConnectedName: Social ConnectedDescription: Social Connected is a new professional, easy to use Joomla template released by the Joomladesigns team which includes custom CSS style layouts for the Jomsocial and K2 Extensions. The Social Connected template includes the following features Three Jooml ...Owner: JoomlaDesignsTags: Computers, Communications, Business, Architecture
ExtendName: ExtendDescription: Extend is a professional easy to use Joomla template released by the Joomladesigns Team. The new Extend template supports the following features Includes Four different Joomla Templates Built-in colour picker to customize the template colour scheme Bui ...Owner: JoomlaDesignsTags: Business, Beauty, Architecture
NgineName: NgineDescription: Ngine is a new professional Joomla template from Joomladesigns.co.uk which supports a wide range of features including Five built-in Joomla templates Slide show Slide pop up boxes K2 CSS styles RTL support Six built in font styles Lots of module posi ...Owner: JoomlaDesignsTags: Software, Portal, News, Games
Simply City 2Name: Simply City 2Description: Simply City is a professional, fast loading Joomla template which is easy to use and includes a wide range of features. The web design also supports CSS styles for the popular K2 extension. The Joomla template includes the following features 3 multi col ...Owner: JoomlaDesignsTags: Computers, Communications, Business
Simply CityName: Simply CityDescription: Simply City is a professional, fast loading Joomla template which is easy to use and includes a wide range of features. The web design also supports CSS styles for the popular K2 extension. The Joomla template includes the following features 3 different ...Owner: JoomlaDesignsTags: Electronics, Computers, Communications, Business- Show more...













