Joomla Localhost to Server: Website Deployment

This is a beginner’s tutorial on how to finalize your Joomla web development in XAMPP localhost, and then deploy it to your web hosting server using either a domain or a sub-domain.

The first section of this article deals with the final preparations and adjustments to your localhost Joomla website. If you have already done this and just need to know the steps involved in uploading/deploying Joomla from your localhost to your web hosting server, then you can skip the “Correct content appearing on your website” section and go to the next section (“Add a domain or sub-domain where Joomla will be hosted”).

This is a two-part tutorial. The first part will discuss website preparations and importing the Joomla MySQL local host database to the hosting server. The second part will discuss the uploading procedures and configuring the website to work on the live website server.

It also includes checking procedures to make sure that the website will function normally, as it did on the XAMPP local host.

Correct content appearing on your website

Some web developers forgot to remove some of the Joomla default content when they upload the website to their web server. And of course, this does not look good, particularly if users will be visiting your website. To make sure you have the correct content appearing on your website:

1. Log in as Joomla administrator. (e.g. http://localhost/joomla/administrator).

2. Click “Article Manager.”

3. Click “New” to add a new article containing the correct website content.

4. Enter the title of your article.

5. Enter the “alias” of your article. This will be used to generate an SEO-friendly URL.

6. Type content.

7. Select the appropriate “section” (e.g. “News”).

8. You can promote that content on your front page by selecting “Yes” under “Front page.”

9. Expand “Parameters (Advanced).” Change the following parameters to “Hide.”

  • Article rating
  • Author name
  • Created Date and Time
  • Modified Data and Time
  • PDF Icon
  • Print Icon
  • E-mail icon

This will make your content appear clean by removing unnecessary details. You can retain those parameters if you like.

10. To publish the content, click “Apply,” and then click “Save.”

You have published a single item of original content; now repeat the above steps (2 to 10) if you would like to add more content to your Joomla website.

11. Go to “Article manager.” Remove all of the Joomla-related content (default Joomla content). You can select them and then click “Trash.” All content appearing in “Article Manager” should only be your website’s original content.

12. You need to empty the trash. Go to Content == Article Trash.

{mospagebreak title=Add a domain or sub-domain where Joomla will be hosted}

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
echo $_SERVER['SCRIPT_FILENAME'];
?>

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.

  1. Log in to your hosting control panel.
  2. Click MySQL manager in the hosting control panel.
  3. Enter your desired MySQL database username, password and database version. It is recommended that you use MySQL 5.1 version for Joomla Version 1.5.20
  4. After you have clicked “Create Database,” the database will be created. Take note of the following information for your newly created Joomla MySQL database:
    • Database hostname
    • Database nameDatabase username
    • Database password

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:

  • Under “Export” click “Select All.” This will select all MySQL tables.
  • Click “SQL” under “Export.”
  • Make sure “Save as File” has been checked.
  • Set Compression to “None.”
  • Leave others at their default settings.

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.

[gp-comments width="770" linklove="off" ]
antalya escort bayan antalya escort bayan