Site Administration Page 2 - Joomla Localhost to Server: Website Deployment |
If you would like your localhost Joomla to be deployed to a web server, you need to add a new domain name to your existing hosting account. Different web hosting companies also have different ways of adding a domain name to a hosting account. In this case, you need to contact your web hosting support for details. For the purpose of this tutorial, suppose you need to deploy Joomla to an existing domain, and you need it to be installed as a sub-domain. For example, if the domain is: http://www.php-developer.org, and you need Joomla to be deployed as a sub-domain like this: http://codexjoomla.php-developer.org/ The following are the steps you'll need to take. In this example, I'm using the Agilityhoster.com hosting control panel; the procedure can vary with other hosting companies.
1. Log in to your hosting control panel. 2. Go to Subdomain Manager and add a new sub-domain. The new sub-domain named codexjoomla.php-developer.org will be added:
Now that you have added a domain or sub-domain, to be used for your Joomla website, you also need to get the absolute path of the root directory, where you will be uploading the Joomla website files. The easiest way to do this is to upload the following PHP script to the root directory of your website: <?php You can name the PHP script "index.php." Now open a web browser and navigate to the future home page URL of your Joomla website, e.g. http://www.example.com/, or if you are using sub-domain, http://yoursubdomain.example.com It should return the absolute path of the root directory. For example:
In the screen shot above, the absolute path of the root directory where the Joomla website files will be uploaded is: /home/www/codexjoomla.php-developer.org/ IMPORTANT: After getting the absolute path information, you can safely delete index.php, which contains the script prior to uploading Joomla files to your web hosting server (this will be discussed in the second part of this tutorial). Import Joomla Localhost MySQL database into the Web Hosting Server You need to create a new MySQL database first, for your live website using your web hosting control panel, before you can export your Joomla localhost database. This database will be the one to be imported with the Joomla localhost database.
Note that the procedure to create the MySQL database will vary from one web hosting company to another, so please refer to your web hosting support. Now that the database has been created, you are ready to export your Joomla localhost MySQL database to this newly created database on your web hosting server. The following are the procedures: 1. Log in to your XAMPP localhost phpmyadmin. (http://localhost/phpmyadmin). 2. Click the Joomla database. You will then see the Joomla tables, such as those shown in the screen shot below:
3. Click the “Export” link. You can see it as shown in the above screen shot. 4. Under “View dump (schema) of database," set the following:
5. Click “GO.” The SQL file will be saved to the download folder, so locate it. The filename will have the .sql extension. 6. Using your hosting control panel, log in to the newly-created MySQL database in your remote hosting server using phpMyAdmin. 7. When you see the message “Welcome to phpMyAdmin,” click “Database.” You will see the list of MySQL database. Click your Joomla MySQL database, and then you see “create table” page. 8. You do not need to create tables because all you need to do is import your localhost Joomla MySQL database to your live site database. So click the “Sql” link. This will open the Sql query window. 9. When the SQL query window pops up, click “Import files.” 10. Locate the .SQL file you have exported from your Joomla localhost database in the second through fourth steps above. Under compression, click “none.” 11. Click GO. this will import your localhost Joomla database to your live Joomla website database.
If no error is shown, then you have successfully imported the database. Try clicking the Joomla database again, and you will no longer see empty tables. Instead, you should see a complete list of Joomla MySQL tables -- the same ones as are shown in your localhost database.
blog comments powered by Disqus |
|
|
|
|
|
|
|