In this guide I will describe you how to move your Joomla site from a web server to your pc for local testing. However the same procedure should be ok for moving the Joomla installation to a new web server or another Linux pc. I will assume that the original site is hosted in a Linux server and you want to transfer it to your Windows box.
The steps you will have to get through in order to move your site are the following:- Files Backup
- MySQL Backup
- Installing Windows http/php/mysql Server
- Restore site files
- Edit site files
- Restore MySQL database
- Final Apache Configuration
1. Files Backup
First we have to back up all the files from our site.- Using ssh
If you have an ssh account for your site login and go to your site's root directory. For example if your site is named http://www.site.com go to the directory which contains the site / directory. Normally this should be the first directory that your ssh account logs you in. Here type:
tar -czf backup.tar.gz site/
This should take a while depending on how big is your site. When the command will stop being executed download the backup.tar.gz file to your pc. Don't forget to delete the backup.tar.gz file from your web server. Delete it by typing:
rm -f backup.tar.gz
- Using CPanel

Next click on the "Home Directory" button under Download a Home Directory Backup. Wait a little and you will be prompted to download the backup.

2. MySQL Backup
Now, it's time to back up the database of your site. Log in to your phpMyAdmin account. Take a look at the MySQL version your server uses. Note it down since you will need it later for the import proccess in case it is differnet from version 5. Here I have version 5.0.16.
To export the whole database click on the Export link.

Select your database from the Export list (1), tick "Add DROP TABLE / DROP VIEW" (2), tick "gzipped" (3) and click the "Ok" button (4). When the backup proccess is completed you will prompted to download the mysql.site.gz file.

3. Installing Windows http/php/mysql Server
We are going to use WAMP which is a very easy way to install Apache, PHP and MySQL with a few clicks! Download it from here and install it. Just leave the default settings. They are ok.
4. Restore site files
Take the backup.tar.gz file you created before, copy it under C:\wamp\www and extract it there. Now you should have a directory C:\wamp\www\site which contains all your site's files.
5. Edit site files
- configuration.php
$mosConfig_absolute_path = '/home/site'; $mosConfig_cachepath = '/home/.user/site/cache'; $mosConfig_host = 'mysql.site.net'; $mosConfig_live_site = 'http://www.site.com'; $mosConfig_password = 'your_database_password'; $mosConfig_user = 'your_database_username';
and change them like that:
$mosConfig_absolute_path = 'C:/wamp/www/site'; $mosConfig_cachepath = 'C:/wamp/www/site/cache'; $mosConfig_host = 'localhost'; $mosConfig_live_site = 'http://localhost/site'; $mosConfig_password = ''; $mosConfig_user = 'root';
Save and exit.
- .htaccess
# RewriteBase /
to
RewriteBase /site
Save and exit.
6. Restore MySQL database
Now let's see how you can restore your MySQL Database. Run Wampserver from the start menu. If it loads ok a white icon should appear in your tray. Click on it and then click phpMyAdmin. phpMyAdmin should load in your browser. Click import.
Here click the browse button (1) and find the mysql.site.sql.gz file you created before. Wampserver has MySQL version 5, therefore if you previously had noted another version such as 4 you must change the 'SQL compatibility mode' (2). Finally click "Go" (3). Wait for a few minutes and the database will be imported.

However a few problems might occur at this step.
The maximum imported sql file size is 2,048KiB which means that if your database backup is larger than 2MB you can't load it. Moreover the upload script may need more memory than the amount provided by php.
To solve those problems open the file C:\wamp\bin\apache\apache2.2.6\bin\php.ini and change the following lines:
post_max_size = 8M upload_max_filesize = 2M memory_limit = 8M
to
post_max_size = 20M upload_max_filesize = 20M memory_limit = 20M
Save and exit. Click on the wamp tray icon and select "Restart All Services". Now go again to http://localhost/phpmyadmin/, click the Import link and the Maximum upload size should be 20,480 KiB as shown in the image below.

Alternatively you can configure phpmyadmin to use a directory of your system as the default upload dir. To do so create a directory named upload in C:\wamp and copy in there the needed file e.g. mysql.site.sql.gz Next edit C:\wamp\apps\phpmyadmin2.10.1\config.inc.php Change the line:
$cfg['UploadDir'] = '';
to
$cfg['UploadDir'] = '../../upload';
Save, exit and restart all services from wamp tray icon. Now when you log in phpmyadmin and go to the Import screen you will notice a drop down menu with mysql.site.sql.gz in it (1). Select it and click 'Go' to restore the database.
**Note: If you haven't placed any files in the upload directory the option 'web server upload directory won't be available'.
**Note: If you haven't placed any files in the upload directory the option 'web server upload directory won't be available'.

You might also face the following error in case your database is too big "Script timeout passed, if you want to finish import, please resubmit same file and import will resume." In that case you must edit C:\wamp\apps\phpmyadmin2.10.1\config.inc.php Change the line:
$cfg['ExecTimeLimit'] = 300;
to
$cfg['ExecTimeLimit'] = 0;
Save, exit and restart all services from wamp tray icon. Then try again to import your database.
When the upload completes successfully you will see a message "Import has been successfully finished, #### queries executed."
7. Final Apache Configuration
In order the site to work properly you must have the rewrite_module enabled in your apache configuration. To do so, click on the wamp tray icon and click on Apache Modules -> rewrite_module the one you see in the image below.

All services should restart automatically. When they restart open your favorite browser and type in the address bar:
http://localhost/site
That's it! Enjoy!
Please do not use the comments function to ask for help! If you need help, please use our guides forum .
Set as favorite
Email this
Hits: 57140
Trackback(0)
TrackBack URI for this entryComments (19)
Subscribe to this comment's feedIm in phpMyAdmin - 2.9.0.3
Hi dear, thanks for complete tutorial... but honestly, i cant. there are no feature $cfg['ExecTimeLimit'] like you said there. Would you show me more than ?
thanks.
thanks.
...
You can add this option manually in your config.inc.php Just type it yourselft, logout from phpmyadmin and restart apache and php for the change to take effect.
access denied error
Hi i keep getting this error when i am trying to import my database
#1044 - Access denied for user 'collegh1'@'localhost' to database 'colleg21_teline'
#1044 - Access denied for user 'collegh1'@'localhost' to database 'colleg21_teline'
...
Did you open phpmyadmin using http://localhost or http://your_ip_address? I guess the first one. Try http with your local ip address e.g. 192.168.1.1 or whatever it may be.
Regards,
axel
Regards,
axel
Error....
I tried already this tutorial but i encountered error..like this...
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
...
You get this error in the new server? Have you made the necessary changes in the config file of joomla?
Uniserver + Akeeba
Hi, is there anyway to modify these instructions for using uniform server (rather than wamp) and Akeeba Backup (formerly JoomlaPack)to make the copies? Thanks
error 1046
I keep getting this error:
SQL query:
-- phpMyAdmin SQL Dump -- version 2.6.4-pl3 -- http://www.phpmyadmin.net -- -- Host: rdbms.strato.de -- Generation Time: Jul 01, 2010 at 01:19 PM -- Server version: 5.0.89 -- PHP Version: 5.2.9 -- -- -- -------------------------------------------------------- -- -- Table structure for table `pez_banner` -- CREATE TABLE `pez_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `type` varchar(30) NOT NULL default 'banner', `name` varchar(255) NOT NULL default '', `alias` varchar(255) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default '0', `checked_out` tinyint(1) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(50) [...]
MySQL said: Documentation
#1046 - No database selected
SQL query:
-- phpMyAdmin SQL Dump -- version 2.6.4-pl3 -- http://www.phpmyadmin.net -- -- Host: rdbms.strato.de -- Generation Time: Jul 01, 2010 at 01:19 PM -- Server version: 5.0.89 -- PHP Version: 5.2.9 -- -- -- -------------------------------------------------------- -- -- Table structure for table `pez_banner` -- CREATE TABLE `pez_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `type` varchar(30) NOT NULL default 'banner', `name` varchar(255) NOT NULL default '', `alias` varchar(255) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default '0', `checked_out` tinyint(1) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(50) [...]
MySQL said: Documentation
#1046 - No database selected
...
Have you selected the database you want to export before pressing Go in step 2?
If you are using Joomla 1.5 there are a few components that let you automatically backup and restore a Joomla site.
If you are using Joomla 1.5 there are a few components that let you automatically backup and restore a Joomla site.
website online
hi there i have been updating my site and when i review it i can see my changes,I still dont exactly understand how this updating of site works, because when i go directly to my site(without reviweing)using my address, it still shows me the old version, not the new things i have added on to the front page for example my banner! I can only see this changes when i am updating it and reviewing/refreshing it so am not quit sure which version are people currently seeing! its basically it seems am viewing 2 sites the old one on the web and the refreshed updated one which looks like am the only one seeing it!
please help!!!!!!!!!!!!!!!!!!!!!!!
> Regards
> Odette
please help!!!!!!!!!!!!!!!!!!!!!!!
> Regards
> Odette
Zend Optimizer not installed
I followed all the instructions but instead of wamp I used XAMPP.Everything was going ok but when I finally loaded the page ,the following error appeared.
This file was encoded by the Zend Guard. In order to run it, please install the Zend Optimizer (available without charge), version 3.0.0 or later.
Seeing this message instead of the website you expected?
This means that this webserver is not configured correctly. In order to view this website properly, please contact the website's system administrator/webmaster with the following message:
The component "Zend Optimizer" is not installed on the Web Server and therefore cannot service encoded files. Please download and install the Zend Optimizer (available without charge) on the Web Server.
NO ERROR WITH PORBLEM
it is working fine but after this process wamp server is redirecting my site towards live site
Warning and Fatal Error
Thanks for a great tut!
All worked fine till the end when I log in to localhost/*site.
What do I do to fix this below?
( ! ) Warning: require_once(/usr/www/users/*site/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in C:wampwww*siteincludesjoomla.php on line 71
-----------------------------------------------------------------------------
Call Stack
#TimeMemoryFunctionLocation
10.0019751328{main}( )..index.php:0
20.03032602728require_once( 'C:wampwww*siteincludesjoomla.php' )..index.php:26
-----------------------------------------------------------------------------
( ! ) Fatal error: require_once() [function.require]: Failed opening required '/usr/www/users/*site/includes/version.php' (include_path='.;C:phppear') in C:wampwww*siteincludesjoomla.php on line 71
-----------------------------------------------------------------------------
Call Stack
#TimeMemoryFunctionLocation
10.0019751328{main}( )..index.php:0
20.03032602728require_once( 'C:wampwww*siteincludesjoomla.php' )..index.php:26
All worked fine till the end when I log in to localhost/*site.
What do I do to fix this below?
( ! ) Warning: require_once(/usr/www/users/*site/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in C:wampwww*siteincludesjoomla.php on line 71
-----------------------------------------------------------------------------
Call Stack
#TimeMemoryFunctionLocation
10.0019751328{main}( )..index.php:0
20.03032602728require_once( 'C:wampwww*siteincludesjoomla.php' )..index.php:26
-----------------------------------------------------------------------------
( ! ) Fatal error: require_once() [function.require]: Failed opening required '/usr/www/users/*site/includes/version.php' (include_path='.;C:phppear') in C:wampwww*siteincludesjoomla.php on line 71
-----------------------------------------------------------------------------
Call Stack
#TimeMemoryFunctionLocation
10.0019751328{main}( )..index.php:0
20.03032602728require_once( 'C:wampwww*siteincludesjoomla.php' )..index.php:26
Write comment