Stop Censorship

HomeData RecoverySharing Your Joomla Website on a USB Stick or Portable Hard Disk with Server2Go

Sharing Your Joomla Website on a USB Stick or Portable Hard Disk with Server2Go

downloadIf you have ever wondered how to share a copy of your website on a USB stick or an external hard disk without the need to install additional software such as WAMP, than Server2Go is the way to go. The following practical steps will produce an identical copy of the site on your USB stick or (portable) hard disk on your home computer without the need to install a WAMP server.

A Joomla website consists of three separate components: 1) the databases with the text, and 2) the scripts and codes that make up the Joomla package and 3) the files you use (like photos, mp3s, etc). As a content management system or CMS, Joomla stores data in mysql databases. In order to make a copy on your home computer, you will need to make a copy of the codes,  the scripts, files and the database and use a program that mimicsan operating environment on your Windows computer that Joomla understands.

With Server2Go, you create a working environment on your Windows computer that 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.

Although this may all sound complicated, it is not so difficult to create a working copy of your website on a USB stick or portable hard disk once you know what you are doing. As such, please visit our disclaimer before you to delete or otherwise render your website useless.

Sharing your hosted website with a USB stick (or hard disk) on your home computer using Server2Go is also a great way of backing up and sharing your site.
 
The steps involved in making a portable copy of your Joomla website:
 

Step 1: Download Sever2Go: Please ensure that you download the package from this website since there are may be other versions of similar packages on the internet that are not maintained by the developer. There are different versions of Server2Go - we recommend that you download the Zip file containing the PHP 5.3.2, SQLite, MySQL 5.1.46 version.

 

Step 2: Make a Directory on the C:\ Drive: The next step is to make a directory on the C:\ drive called "My Joomla website".  -->  C:\My Joomla website

 

Step 3: Unzip the Downloaded File into the Folder C:\My Joomla Website: When you open the Zip file you downloaded from the server2go website, you see a folder called server2go in the file. Place the server2go folder in the C\:My Joomla Website folder. Open the contents of the folder. It should look like this in the directory C\:My Joomla Website\server2go:

 

Please note the highlighted folder htdocs. This is the folder where we will place a copy of the Joomla website later in this tutorial.

 

Step 4: Make a subdirectory in the C:\My Joomla Website\server2go\htdocs folder: In the C:\My Joomla Website\server2go\htdocs folder, we need to create a subdirectory where you are going to store a copy of your website. Create the folder C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA   It should look like this in the directory C\:My Joomla Website\server2go\htdocs\:

Step 5: Export a copy of the database: Before we are going to copy the website, we need to export the database of your website. Assuming you have access to the CPANEL for your website (provided by the Internet provider), you can export a copy of the database. For this, you go to PHPMyAdmin in the CPANEL, 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 Go on the low right side of the screen to export the database:

 

Step 6: Copy the database to the C:\My New Joomla\server2go directory: After you downloaded the database, we need to copy it into the directory: C:\My Joomla Website\server2go  

 

Step 7: Create a database using phpMyAdmin Once you have downloaded the data, go to the C:\My Joomla Website\server2go folder and click on Server2Go.exe to launch the program (it does not install anything).

A configuration window in the explorer web browser (set as default) should open (see below) and click on phpMyAdmin under the Tools section on the right:

 

 

After clicking on phpMyAdmin under the Tools section on the right, you see the following screen. Enter as username root, do not enter a password and click on Go.

 

 

The next step is to create a new database and give it a name. In our example, we will use NEW_DATABASE. 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:

 

Step 8: Import the database using phpMyAdmin: Once you have a new database created, select the database, enter again root as username and select the option Import. Import the database that you copied to the directory in step 6).

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

 

 

Browse to the directory: C:\My Joomla Website\server2go and select the database you exported earlier in step 6 and click on Go:

 

 

Please note that the maximum size of the database is 2,048 KB by default. You can change this in Server2Go in case you have a large database. Go to the following folder:  C:\My Joomla Website\server2go\server\config_tpl\ and open php.ini with notepad. Notepad will open and search for the following code: upload_max_filesize = 2M and change it to 8M or more and save the file:

 


 

Step 9: Export a copy of the scripts, codes and other Joomla files: After importing the database, we need to import the other files to link these to the database. 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 (or any other folder where the website is saved) 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 10: Copy the scripts, codes and other Joomla files to the htdocs/NEW_JOOMLA 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 9. For this, login the FTP and open the public_html folder and look for the zip file. Ensure you wait a few minutes for the server to complete your backup, otherwise you may download an incomplete Zip file. Copy this zip file (in our case called "administrator.zip") to the C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA folder and unzip the file in this 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 11: Rename configuration.php: After you have unzipped the file in step 10, look in the public_html folder in the C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA folder and look for the file configuration.php. Save this file as configuration_original.php as a backup.

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

 

Step 12: Edit the configuration.php: We need to tell the system to make a link between the database we imported and the scripts, codes and other files we copied to C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA folder. We need to make a few simple changes to the configuration.php (in C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA folder). Open the configuration.php files in JEDIT, notebook or other plain text editor.  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 7 = NEW_DATABASE'; so it should read var $db = 'NEW_DATABASE';

var $dbprefix = 'jos_';

var $log_path = 'C:\\My Joomla Website\\server2go\\htdocs\\NEW_JOOMLA folder\\logs'; (please note the double back slashes - keep these)

var $tmp_path = 'C:\\My Joomla Website\\server2go\\htdocs\\NEW_JOOMLA folder\\tmp';

The other settings do not need to be changed.

 

Step 13: Rename the .htaccess file In case you find a .htaccess file in the C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA  folder, you will have to rename it into htaccess.txt to avoid 500 errors. Go to C:\My Joomla Website\server2go\htdocs\NEW_JOOMLA folder 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.

 

Step 14: Change the Server2Go Settings This tutorial is about using Server2Go on a writable medium such as a hard disk or a USB Stick. This tutorial does not cover the settings of Server2Go if you want to use it on a CD-ROM. The settings are found in the pms_config.ini file in C:\My Joomla Website\server2go

DefaultFile=NEW_JOOMLA /

;--- defines the root directory in that all webfiles are saved

;--- The browser that is started after server start (possible values: IEXPLORER, FIREFOX, PORTABLEFIREFOX, MOZILLA, DEFAULT, EXTERNAL)
;--- Please take a look at the www.server2go-web.de/wiki pages for a documentation how to use PORTABLEFIREFOX!!!!!!!!
BrowserType=PORTABLEFIREFOX

BrowserPath=FirefoxPortable/FirefoxPortable.EXE

 

[database]
;--- 1 if MySQL Server should be started
UseMySQL=1
;--- 1 if the database files from the dbdir directory will be mirrored to
;--- a directory of the local machine
LocalMirror=0
;--- 1 if the mirrored database should be overwritten at each start of the
;--- the server
OverwriteLocalMirror=0
;--- The path to that the database should be mirrored (e.g.. c:\MyS2GApp\Data\) , if empty the
;--- default temp directory is used
MirrorFolder=
;--- If value is 1 all files of the database server will be deleted after
;--- Server shutdown
DeleteDatabaseFiles=0
;--- The port that should be used for MySQL. If empty the default mysql port is used
MySQLPort=7188
;--- Commandline parameters (i.e. skip-innodb)
MySQLCmd=--skip-innodb
;--- If HideMirrorFolder is set to 1 the folder will created as hidden folder
HideMirrorFolder=0
;--- MySQL Mode. If set to NETWORK the MySQL Server is reachable via network. Default is LOCAL (only available from local machine)
MySQLMode=LOCAL

 

 

Congratulations, your website using Server2Go should be working!

 

Go to the Server2Go directory and click on the Icon. Your website should launch automatically.

 

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. You can change this in Server2Go. Go to the following folder:  C:\My Joomla Website\server2go\server\config_tpl\ and open php.ini with notepad or JEDIT and change the following code: error_reporting = ALL into error_reporting = E_ERROR and save the file. The notices should have disappeared.

 

Step 16: Moving a Server2Go folder to other folders and/or home computers. You may want to copy a website from your home computer another home computer, hard disk or USB stick. All you need to do is to copy the entire C:\My Joomla Website\   folder and ensure the links in step 12 are correct.

Comments
Add New Search
+/-
Write comment
Name:
Email:
 
Title:
 
Please input the anti-spam code that you can read in the image.
Francis  - Takes too long to zip |2011-12-31 19:07:06
I did not know I had big video and images folder that came up to 1.5GB. Zipping bought it down to 1.3GB. And today it's due to the customer and my internet connection is a 256 Kpbs. The zipping took 4ever on the Cpanel.

Should have just copied it directly over FTP, at least it would have been ready by this morning.
 
You may also be interested in the following tutorials