Stop Censorship

HomeJoomla SettingsExtensionsImporting a Joomla Site to Your Computer

Importing a Joomla Site to Your Computer

downloadEver wondered how to export a copy of your Joomla site hosted by a hosting company to a home computer? The following practical steps will produce an identical copy of the site on your home computer.

A Joomla website consists of two separate components: 1) the databases and 2) the scripts and codes that make up the Joomla package. As a content management system or CMS, Joomla stores the data in mysql databases. In order to make a copy on your home computer, you will need to make a copy of the 1) codes, 2) the scripts and the database and 3) install the operating environment on your Windows computer Joomla understands. Although this may look complicated, it is not so difficult once you know what you are doing. As such, please visit our disclaimer before you to delete or otherwise render your website useless.

 

Importing your hosted website to a home computer is a great way of backing up your site.

 

Step 1: Download WAMP from www.wampserver.com Please ensure you download the package from this website since there are many other versions of similar packages on the internet. These are not necessarily inferior to WAMP, but we use WAMP for our example.

Step 2: Disable SKYPE temporarily If you use SKYPE, you need to change a setting first before you install WAMP. Go to Tools and Options in SKYPE and click on Advanced and Connection and disable the option: "Use port 80 and 443 as alternatives for incoming connections." This will avoid a conflict with WAMP later.

 

Disable port 80 in Skype:

 

Step 3: Restart the computer We like to restart the computer after we made the change to SKYPE in step 2. This way, we know for sure there will be no conflict with the WAMP program that by default uses port 80.

Step 4: Install WAMP on your home computer You install the webserver like any other windows program. Make sure you close all programs. If you have SKYPE installed, make sure you log-out Skype and stop its services temporarily. With Skype running, WAMP may have a problem installing.

With WAMP, we install a working environment on your Windows computer Joomla understands. Joomla does not run on windows directly; it runs on an Apache, PHP and MYSQL environment. These are the building blocks of the operating system Joomla needs to be able to work.

  • PHP, or PHP: Hypertext Preprocessor, is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. Its original meaning was Personal Home Page.
  • The Apache HTTP Server, commonly referred to as Apache, is web server software notable for playing a key role in the initial growth of the World Wide Web.
  • MySQL is a relational database management system that runs as a server providing multi-user access to a number of databases.

WampServer or WAMP is a Windows web development environment that allows you to run web applications like Joomla with Apache, PHP and the MySQL database. It also comes with PHPMyAdmin to easily manage your databases which we will use later to install your Joomla copy on your home computer.

The wamp server is installed correctly if you see a white indicator in the Windows toolbar (like the one on the left in this picture right of the arrow):

If the indicator shows a red flag or is yellow, you have a problem with the wamp installation, most likely a conflict with another program that uses port 80.

Step 5: Export a copy of the database Assuming you have access to the CPANEL for your website (provided by the Internet provider), you can export a copy of the databases. For this, you go to PHPMyAdmin, select the database you want to export, select Add Drop Table, select the option save as file and select go. The system exports a copy of the database. If you do not have access to the CPANEL, use LazyBackup to make a copy of your databases.

Click on phpMyAdmin in the CPanel:

Click on the database you want to export. You can ignore the information_schema database - this is an internal MYSQL database:

 

Click on the select all, select Add Drop Table, select Save as File and click on Export:

Step 6: Copy the database to the WAMP directory Once WAMP is installed, you will find a directory called WAMP on the hard disk (normally on the C:\ drive). Open the www directory inside the WAMP directory and create a new directory with the name of your Joomla website: NEW_JOOMLA for example, and copy the database in the directory: C:\wamp\www\new_joomla\

Step 7: Import the database using PHPMyAdmin Once WAMP is installed, type localhost in your web-browser and the WAMP start page will pop up. Make sure the wampserver is running. It is running if you see the white icon in the toolbar (see step 4). Click on the option phpMyAdmin and create a new database and give it a name. In our example, we will use NEW_DATABASE. Once you have a new database created, select the database and select the option Import. Import the database that you copied to the directory in Wamp (see step 6).

Type in NEW_DATABASE in the field under Create new database and use utf8_general_ci (is the default) connection collation and click on create:

 

Select the new_database from the list on the left and select import:

 

 

Browse to the C:\wamp\www\new_joomla\ directory and select the database you exported earlier in step 5 and click on Go:

 

 

Please note that the maximum size of the database is 2,048 KB by default. You can change this in WAMP in case you have a large database. Click with the left mouse on the wamp icon in the toolbar. Select PHP and php.ini. Note book will open and search for the following code: upload_max_filesize = 2M and change it to 8M and save the file:

 


 

Please also note:

You may also run into the following problem related to the MySQL server:

You can change this in WAMP in case you have a large database. Click with the left mouse on the wamp icon in the toolbar (as we did above for the PHP.ini). Select MySql and my.ini. Note book will open and search for the following code: max_allowed_packet = 1M and change it to 100M and save the file.

Step 10: Export a copy of the scripts, codes and other Joomla files Assuming you have access to the CPANEL for your website, you can make a copy of all files on the server. For this, you go to Files in the CPANEL, select all files in the public_html folder and select the option compress. The system now will ask you for a name of the file and where to copy it on the server.

In the CPanel, select File Manager:

The File Manager opens. Select all and click on compress:

 

 

This is the compress menu. Select an archive type (zip for example) and click compress files. A zip with the entire website will be copied to the public_html directory on the server. In this case, the file is called Administrator:

 

 

Step 11: Copy the scripts, codes and other Joomla files to the WAMP directory Assuming you have access to the FTP site for your website, you can make a copy of the zip file your created under step 10. For this, login the FTP and open the public_html folder and look for the zip file. Copy this zip file to the C:\wamp\www\directory with the name of your Joomla website -  C:\wamp\www\NEW_JOOMLA for example, and unzip the file in the same directory. We recommend you use 7ZIP (opensource for free and available here) which is much faster than the Windows unzip facility. If you do not have access to the CPANEl, you can check out the Joomla component Joomlapack that is available in the JED.

Step 12: Rename configuration.php After you have unzipped the file in step 11, look in the public_html folder in the C:\wamp\www\NEW_JOOMLA folder and look for the file configuration.php. Save this file as configuration_original.php

You now have two identical files: configuration_original.php and configuration.php. The next step is to make changes in configuration.php

Step 13: Edit the configuration.php. We need to tell the system to make a link between the database we imported in step 7 and the scripts, codes and other files we copied to C:\wamp\www\NEW_JOOMLA. We need to make a few simple changes to the configuration.php. Open the configuration_original.php and configuration.php files in JEDIT, notebook or other plain text editor. They will look exactly the same. Look for the following variables and enter the following values in the configuration.php file and save the configuration.php file:

var $dbtype = 'mysql';

var $host = 'localhost';

var $user = 'root';

var $password = ''; (please ensure you delete any password in the quotes if you have had any otherwise you will get an error)

var $db = 'name of the databse you created in step 9 = NEW_DATABASE'; so it should read var $db = 'NEW_DATABASE';

var $dbprefix = 'jos_';

var $log_path = 'C:\\wamp\\www\\NEW_JOOMLA\\logs';  (please note the double back slashes - keep these)

var $tmp_path = 'C:\\wamp\\www\\NEW_JOOMLA\\tmp';

The other settings do not need to be changed.

Step 14: Rename the .htaccess file In case you find a .htaccess file in the C:\wamp\www\NEW_JOOMLA folder, you will have to rename it into htaccess.txt to avoid 500 errors. Go to C:\wamp\www\NEW_JOOMLA and look for the .htaccess - if it is has the extension txt, you do not have to do anything. If it does not have the txt extension, click on it and rename it with the txt extension.

 

Congratulations, your website should be working!

 

Type in localhost in your web-browser and under "Your Projects" you should see a link to your copy of the webpage.

 

Or type in the browser:

 

http:\\localhost\NEW_JOOMLA

 

Step 15: Disable notices. If you start up the new website, you may see strange codes - or notices: To avoid these, you need to change the php.ini file. There are many php.ini files in WampServer, so it important to find the right one. You will find it in the following directory:  C:\wamp\bin\apache\Apache2.2.11\bin Open the php.ini and change the following code: error_reporting  =  ALL into error_reporting  =  E_ERROR - save the file and restart WAMP and open your website. The notices should have disappeared.

Please note that we have Apache2.2.11 installed and as a result our php.ini is in the C:\wamp\bin\apache\Apache2.2.11\bin folder. You may have a different Apache version and look for the php.ini in the Apache folder you use.

Step 16: Moving Joomla websites to other home computers. You may want to copy a website from one WAMP server to another on home computers.  Please keep in mind that you have WAMP installed on the computer on which you want your website to run on. Copy the folder that contains the website in C:\wamp\www to the www folder of the other WAMP server and do not forget to also copy the corresponding database to the other WAMP server. The database can be found in the following folder: C:\wamp\bin\mysql\mysql5.1.36\data\...name of your website (your mysql may be a different version).

It is easy to maintain a copy of a hosted website on your home computer once you have developed your hosted website and you just add new articles. All you need to do is import the database of your production website to the site on your WAMP server on the home computer and copy images with FTP from the folder - for example images\stories.
Comments
Add New Search
+/-
Write comment
Name:
Email:
 
Title:
 
Please input the anti-spam code that you can read in the image.
Anonymous |2010-12-26 18:50:57
Absolutely fabulous tutorial! Works like a charm on my PC.
 
You may also be interested in the following tutorials