Actions

J2.5

Difference between revisions of "Use Joomla! on your own computer"

From Joomla! Documentation

m (How to install another instance of Joomla! on localhost)
(Change page needs editing to review tag)
(41 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{:GSheader}}
+
{{version/tutor|2.5}}{{:Getting_Started_Page_Index/2.5}}{{merge|Xampp174}}
 +
 
 +
{{review|technical|This article should be written from a Multiversion point of view since it describes methods of installing software on a local computer for use as a local server. Any version of Joomla! will work on a local server as long as it meets the requirements of the specific version. The version of XAMPP is out of date - the latest version is 1.8.1 and an example for WAMP would also be highly useful}}
  
{{JVer|1.6}} This is one of a series of documents introducing Joomla! version 1.6.
 
 
{{:xampp}}
 
{{:xampp}}
  
Line 7: Line 8:
  
 
====Before download and installation ====
 
====Before download and installation ====
:*Create a folder for the Joomla installation with a suitable name
+
:*Create a folder for the Joomla! installation with a suitable name
  
Under the XAMPP folder (for example C:\XAMPP\) there is a folder called htdoc (C:\XAMPP\htdoc ). This is the folder under which all content that will be seen on the localhost Web site is located. (There are already files there - such as index.html which displays the logo for XAMPP)
+
Under the XAMPP folder (for example <tt>C:\XAMPP\</tt>) there is a folder called <tt>htdocs</tt> (<tt>C:\XAMPP\htdocs</tt> ). This is the folder under which all content that will be seen on the localhost Web site is located. (There are already files there - such as index.html which displays the logo for XAMPP)
::Open the htdoc folder
+
::Open the htdocs folder
::Create a folder under htdoc to contain the Joomla! files. (It can have any name but Joomla16 is often used for example sites).
+
::Create a folder under htdocs to contain the Joomla! files. (It can have any name but <tt>joomlaXX</tt> is often used for sample sites, where XX denotes the version number). In this example we will use <tt>joomla16</tt>
  
new image needed - frame|center|'''Some of the files under C:XAMPP. Here the Joomla! instance is called Joomla16 and there are Joomla1.5 installations under Joomla15  and development'''
+
[[Image:GSfileshtdocs16.png|frame|center|'''Some of the files under <tt>C:\XAMPP</tt>. Here the Joomla! instance lives and there are in this example two Joomla! installations, one for 1.5 and one for 1.6''']]
  
====Download files for Joomla! - this is for Joomla! 1.6====
+
====Download files for Joomla! ====
  
 
::Go to the main Joomla! site - http://www.joomla.org/  
 
::Go to the main Joomla! site - http://www.joomla.org/  
::Click the Download button. It links to version 1.6
+
::Click the Download button. It links to the latest stable release of Joomla!
 
::Click on the ZIP for the Full Package for the latest version.
 
::Click on the ZIP for the Full Package for the latest version.
 
::Save the file to the Download folder on your computer
 
::Save the file to the Download folder on your computer
Line 26: Line 27:
 
::Right-click the downloaded zip file
 
::Right-click the downloaded zip file
 
::Choose Extract All
 
::Choose Extract All
The Extraction Wizard prompts for where you want the files to be located. This is in the folder created above - for example C:\xampp\htdoc\Joomla16
+
The Extraction Wizard prompts for where you want the files to be located. This is in the folder created above - for example C:\xampp\htdocs\Joomla16
 
::Click Browse to find the folder you have created for the installation of Joonmla! 1.6
 
::Click Browse to find the folder you have created for the installation of Joonmla! 1.6
 
::Click OK
 
::Click OK
Line 39: Line 40:
  
 
== Configure Joomla! and install the sample data ==
 
== Configure Joomla! and install the sample data ==
 +
*Create database Joomla16 using PHPMYADMIN
 
*Open the Joomla! site in your browser
 
*Open the Joomla! site in your browser
 
:If you called the folder for the Joomla! files 'joomla16, then enter the URL in your browser:-
 
:If you called the folder for the Joomla! files 'joomla16, then enter the URL in your browser:-
<nowiki>http://localhost//joomla16 </nowiki>
+
<code><nowiki>http://localhost/joomla16 </nowiki></code>
 +
 
 
If you called the file something else - then use the name of that file instead of 'joomla16'.
 
If you called the file something else - then use the name of that file instead of 'joomla16'.
  
Line 57: Line 60:
 
::Host name is localhost
 
::Host name is localhost
 
::User Name is root
 
::User Name is root
::Set a password for the user name for the database. Use something you will remember!
+
::Set a password for the user name for the database. Use something you will remember! Or leave blank for now - you may need to remove a password entered in this field if you receive an error message when you attempt to connect to the MySQL database in a subsequent installation step.  See note in this section below.
::Database name - this is the name of this instance of Joomla! - in the example here use joomla15. If you used a different name - use that here for the database name.
+
::Database name - this is the name of this instance of Joomla! - in the example here use joomla16. If you used a different name - use that here for the database name.
 
::Press Next when all the entries are done
 
::Press Next when all the entries are done
 
:5. Skip the FTP configuration - so press Next
 
:5. Skip the FTP configuration - so press Next
Line 105: Line 108:
 
===To use the site and the administration pages ===
 
===To use the site and the administration pages ===
 
There are separate web addresses for the main Site and for the administrator Back-end
 
There are separate web addresses for the main Site and for the administrator Back-end
Assuming the site is 'Joomla15':-
+
Assuming the site is 'Joomla16':-
:*The site (also known as the Front-end)  is  <nowiki> http://localhost/joomla16/</nowiki>
+
:*The site (also known as the Front-end)  is  <code><nowiki> http://localhost/joomla16/</nowiki></code>
  
:*The administration page - (known also as the Back-end) is <nowiki> http://localhost/joomla16/administrator</nowiki>
+
:*The administration page - (known also as the Back-end) is <code><nowiki> http://localhost/joomla16/administrator</nowiki></code>
 
If you have used a different name - put that in instead of 'Joomla16'
 
If you have used a different name - put that in instead of 'Joomla16'
  
 
==How to install another instance of Joomla! on localhost==
 
==How to install another instance of Joomla! on localhost==
You can install and configure another instance of Joomla! using a different name. You do not need to download it again as it is already in your download folder.
+
You can install and configure another instance of Joomla! using a different name. You ''do'' need to download it again as you removed the installation directory as a security measure.
  
 
:*Create a new folder under htdoc - with a different name from the first installation. For example - development16
 
:*Create a new folder under htdoc - with a different name from the first installation. For example - development16
Line 126: Line 129:
 
This time the addresses are different:-
 
This time the addresses are different:-
 
:Open the Joomla! site - assuming the folder was called is 'development16':-
 
:Open the Joomla! site - assuming the folder was called is 'development16':-
:*The site is  <nowiki> http://localhost/development16/</nowiki>
+
:*The site is  <code><nowiki> http://localhost/development16/</nowiki></code>
:*The administration page is <nowiki> http://localhost/development16/administrator</nowiki>
+
:*The administration page is <code><nowiki> http://localhost/development16/administrator</nowiki></code>
 
If you have used a different name - put that in instead of 'development16'
 
If you have used a different name - put that in instead of 'development16'
  
Line 139: Line 142:
  
 
:*Find the script:-
 
:*Find the script:-
\XAMPP\uninstall_xampp.bat (It appears on the Details list in Windows Explorer as a MS-DOS Batch File).
+
::<code>\XAMPP\uninstall_xampp.bat </code>
 +
::(It appears on the Details list in Windows Explorer as a MS-DOS Batch File).
 
:*Run this script (Double-click on the file name)
 
:*Run this script (Double-click on the file name)
 
This opens a command window and asks if you want the htdocs directory deleted.
 
This opens a command window and asks if you want the htdocs directory deleted.
Line 160: Line 164:
  
 
Become familiar with Joomla! by altering and adding content.
 
Become familiar with Joomla! by altering and adding content.
*[[Hands-on editing an article: Joomla! 1.5|Hands-on how to begin to edit an Article.]]
+
*Hands-on editing an article: Joomla! 1.6|Hands-on how to begin to edit an Article.
 
and
 
and
*[[Hands-on adding a new article: Joomla! 1.5|Hands-on how to create a new Article.]]
+
*Hands-on adding a new article: Joomla! 1.6|Hands-on how to create a new Article.
  
 
==Further information==
 
==Further information==
:*[http://help.joomla.org/ghop/feb2008/task048/joomla_15_quickstart.pdf Help with installation and creating your own content.] This is the very useful ''Quick Start Guide''. Make sure you look at this alongside this tutorial.
+
:* Make use of the on-line Help for detailed information
  
:*[http://community.joomla.org/august-2008/article/522-introductory-learning-joomla-using-sample-data.html Using the sample data.] This has details about the sample data and what you can learn from it.
+
:* Using the sample data. There is some documentation on the sample data on the sample website created on localhost.
  
 
:*[http://www.apachefriends.org/en/xampp-windows.html Documentation about installing and using XAMPP]. This is the documentation for XAMPP and also  has links to help about xampp.
 
:*[http://www.apachefriends.org/en/xampp-windows.html Documentation about installing and using XAMPP]. This is the documentation for XAMPP and also  has links to help about xampp.
 
==Index to other documents in this series==
 
{{:GSFooter}}
 
 
 
----
 
----
[[User:LornaS|Lorna Scammell]] December 2010
+
[[User:LornaS|Lorna Scammell]] February 2011
 +
<noinclude>[[Category:Server setup local]]</noinclude>

Revision as of 05:02, 6 June 2013

Contents

Merge-icon.png
Merge Notice

It has been suggested that this article or section be merged with Xampp174. (Discuss). Proposed since 13 months ago.


Copyedit.png
This Page Needs Your Help

This page is tagged because it NEEDS TECHNICAL REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.

Reason: This article should be written from a Multiversion point of view since it describes methods of installing software on a local computer for use as a local server. Any version of Joomla! will work on a local server as long as it meets the requirements of the specific version. The version of XAMPP is out of date - the latest version is 1.8.1 and an example for WAMP would also be highly useful



It is very useful to be able to learn and experiment on your own machine. The aim of this document is to help you to download a sample Joomla! site to your own computer, known as a 'localhost' installation. It has some helpful sample content that allows you to become familiar with the way that a Joomla! site is put together. You can also install an empty copy of Joomla! for creating a new site.

Who is it written for?

Not everyone using this Manual will have enough experience to feel comfortable doing this. You need to know a little about computing, for example:-

  • Know where to find files on your computer and be able to create folders
  • Be able to download something from a Web site and save it in an appropriate place
  • You will not panic if you do not understand a concept!

Experienced developers and people with programming experience will be fine.

  • If in doubt - follow the instructions and try it!

Summary

There are three basic stages in doing this:-

  1. Downloading and installing some software that Joomla! needs to use to run locally, that is to say on your own desktop or laptop computer. This is a web server called Apache, a database called MySQL and a scripting language called PHP. There are a few other things as well - which are downloaded together as one package called XAMPP.
  2. Downloading and installing Joomla!
  3. Configuring Joomla!

Download and install XAMPP

Info non-talk.png
General Information

Important note on versions of XAMPP - as at March 4th 2011. This section covers installation of the older version 1.7.3. There is a newer version, 1.7.4, which became available the end of January 2011.

In the meantime, you can continue to download and use the older version which is reported to be more stable.

The point of this to to configure your own machine to behave as if it were a server with the difference being that the result is not visible over the internet and is thus confined to your own computer. This is very useful for learning new things and even developing a new web site.

Before download

Make sure you have a separate folder for downloads.

Use Windows Explorer
Create a folder (called something meaningful like Downloads) beneath the top level of the directory. (Depending on how your computer is set up - this will be C:\Downloads)

Download XAMPP

Download sites for using a Mac or Linux with documentation.

For installation instructions of Xampp and Joomla on Linux see also Installing_Joomla_on_Debian_Linux

Warning: If you are not familiar with downloading software - don't be put off by unfamiliar vocabulary on the download Web site!

The site for Windows download. This is a page with links to downloads as well as instructions for installation.

This is what you do to get the stable 1.7.3 version:-

Find this in the first part of the screen - Download older versions of XAMPP (even the "old" WAMPP) directly from Sourceforge
Go to Sourceforge link - which is at http://sourceforge.net/projects/xampp/files/
Click XAMPP Windows choice
This lists previous versions
Choose xampp-win32-1.7.3.exe
In the window that opens
Click Save File
In the Save In box - find the Download folder on your conmputer
Click Save

A file with the XAMPP logo is saved to the Download folder. In Windows Explorer Details view, the file type will be Application.

Install XAMPP - version 1.7.3

Extracting the software and installing the files:-

  • Run the file
Double-click the file name
You may be asked to confirm that you want to run the file - if so - Click Run.

The next window gives on-screen instructions.

The XAMPP installation screen. Note that it gives on-screen instructions.
  • Use the top level of the C: drive - so leave the C: as it is. (If you want it elsewhere, Browse for the folder where you want it)
Click Install

Installation Progress is indicated on the screen. When the files are extracted, a Windows command screen asks a few questions to configure the installation.

Respond to these with the defaults.
A Windows command screen. This may be unfamiliar - just respond to it as suggested in the text

The files are placed in the correct locations and you are then prompted to press <Return> to continue and to confirm the timezone.

Finally the screen presents 7 choices.

Choose 1 to start the Control Panel and press Return
Choose x to Exit the install process

You should see a XAMPP Control Panel on the desktop. To open it is it is not already open:-

Double-click the Control Panel icon on the desktop.

This is the Control panel with the services running.

The Control panel with the services running.

Apache and MySQL need to run as Services (indicated by a tick against Svc in the Control Panel). Make sure the following are set:-

  • Apache Svc is ticked
  • Apache is Running (Click Start to run it)
  • MySQL Svc is ticked
  • MySQL is Running (Click Start to run it)

Now test localhost

Type in your local home page's address in your browser - which is http://localhost/

If it has not been successful - you will get a message saying 'Unable to Connect'. This may happen if:

  • The most likely cause is that Apache or mySQL are not running. Use the Control Panel to check these.
  • The VOIP software Skype may in some cases interfere with network settings. If you are using XAMPP or MAMP on a Mac OSX computer which also has Skype installed, ensure that Skype is turned off, then quit and re-start MAMP or XAMPP.

If it has been successful - there will be a splash page with a choice of languages.

  • Choose your language

You now see a Welcome page which says 'You have successfully installed XAMPP on this system!'. There are also various links to documentation and other things to the left.

You can move on to downloading and installing Joomla! itself.

Download and install Joomla!

Before download and installation

  • Create a folder for the Joomla! installation with a suitable name

Under the XAMPP folder (for example C:\XAMPP\) there is a folder called htdocs (C:\XAMPP\htdocs ). This is the folder under which all content that will be seen on the localhost Web site is located. (There are already files there - such as index.html which displays the logo for XAMPP)

Open the htdocs folder
Create a folder under htdocs to contain the Joomla! files. (It can have any name but joomlaXX is often used for sample sites, where XX denotes the version number). In this example we will use joomla16
Some of the files under C:\XAMPP. Here the Joomla! instance lives and there are in this example two Joomla! installations, one for 1.5 and one for 1.6

Download files for Joomla!

Go to the main Joomla! site - http://www.joomla.org/
Click the Download button. It links to the latest stable release of Joomla!
Click on the ZIP for the Full Package for the latest version.
Save the file to the Download folder on your computer

It will be called a Compressed(zipped) Folder in the Details list in Windows Explorer

Install the files for Joomla! in the correct folder

Right-click the downloaded zip file
Choose Extract All

The Extraction Wizard prompts for where you want the files to be located. This is in the folder created above - for example C:\xampp\htdocs\Joomla16

Click Browse to find the folder you have created for the installation of Joonmla! 1.6
Click OK
Check that the 'Files will be extracted to this Directory' box has the right folder displayed.
Click Next
The extraction Wizard at work. Make sure the files go to the right folder.

Progress is indicated by the blue bar. When completed an Extraction Complete screen displays.

Click Finish

The files are now in the right place and you are ready to set Joomla! up for use.

Configure Joomla! and install the sample data

  • Create database Joomla16 using PHPMYADMIN
  • Open the Joomla! site in your browser
If you called the folder for the Joomla! files 'joomla16, then enter the URL in your browser:-

http://localhost/joomla16

If you called the file something else - then use the name of that file instead of 'joomla16'.

The Joomla! Installation screen displays. Here you are stepped through seven choices in order to set up the site, the database and a few other things. Your progress is indicated to the left of the screen.

1. Select the language and press the Next button
2. Look at the Pre-installation check. There should not be any red items, apart from Display Errors, which can read On. Press Next to continue.
3. Read the GNU General Public License page and press Next
The database configuration screen illustrates the layout of the display and shows the answers for the database configuration here. It also illustrates that there is a fair amount of on-screen help.
4. The database configuration page.
This sets up and configures the database, where all the content for the site is stored.
  • Enter the details into the form:-
Leave database Type as mysql
Host name is localhost
User Name is root
Set a password for the user name for the database. Use something you will remember! Or leave blank for now - you may need to remove a password entered in this field if you receive an error message when you attempt to connect to the MySQL database in a subsequent installation step. See note in this section below.
Database name - this is the name of this instance of Joomla! - in the example here use joomla16. If you used a different name - use that here for the database name.
Press Next when all the entries are done
5. Skip the FTP configuration - so press Next
6. Site name and sample data.
In the form:-
Give it a name - such as 'Sample'.
Enter an email
Enter a password - and remember this as it lets you use the site!
The rubric explains why you need this.

The sample data

There is some information on the side panel about why you should install the sample data.

Why install the sample data?

  • It is a useful resource
  • It is helpful in showing how a Joomla! site hangs together.
  • You can edit articles
  • You can observe different ways of doing things.
  • It is used in this series of documents

If you want both a site with sample data and a site with no data - you can install another instance of Joomla! on the same computer as explained in the last part of this document.

  • Click the button that says - Install Sample Data.
The button will then read 'Sample data installed successfully'. It is slightly confusing as you might expect it to take longer.
The Main configuration page showing some of the choices, including the selection to install the Sample data


Note:

Sometimes there is a message that the database won't connect. The fix - Click Previous and remove the password. Check that the other settings are the same as you originally entered and then continue.

  • Press Next to continue when all is done

The Finish screen has helpful advice.

You need to do one more thing - remove the installation directory. In this example it is at:-

C:\xampp\htdoc\joomla16\installation

If you try to go on to use the site without doing this, you will be prompted to do it. You are only allowed to continue when it has been deleted.

To use the site and the administration pages

There are separate web addresses for the main Site and for the administrator Back-end Assuming the site is 'Joomla16':-

  • The site (also known as the Front-end) is http://localhost/joomla16/
  • The administration page - (known also as the Back-end) is http://localhost/joomla16/administrator

If you have used a different name - put that in instead of 'Joomla16'

How to install another instance of Joomla! on localhost

You can install and configure another instance of Joomla! using a different name. You do need to download it again as you removed the installation directory as a security measure.

  • Create a new folder under htdoc - with a different name from the first installation. For example - development16
  • Extract the files from the Joomla! download in exactly the same way - but Browse for the new folder name.

Configuring Joomla!

The set up stages are the same, except:-

  • the database will need the name of the site (such as development16)
  • do not enter a password for mySQL root if there is a database error.

And - of course - do not install the sample data if you want a clean site.

This time the addresses are different:-

Open the Joomla! site - assuming the folder was called is 'development16':-
  • The site is http://localhost/development16/
  • The administration page is http://localhost/development16/administrator

If you have used a different name - put that in instead of 'development16'

How to uninstall Joomla! and XAMPP

You may want to uninstall Joomla! and XAMPP. If you do this - make sure you have copies of anything you may need, such as configuration files.

There are two possibilities.

1. Use the uninstall script

The easy way - you can use the uninstall script.

  • Find the script:-
\XAMPP\uninstall_xampp.bat
(It appears on the Details list in Windows Explorer as a MS-DOS Batch File).
  • Run this script (Double-click on the file name)

This opens a command window and asks if you want the htdocs directory deleted.

  • If you choose 'n' - it does not delete the folders \XAMPP\htdocs and \XAMPP\mysql\data - so you will need to do this yourself.
  • If you choose 'y' - it deletes these folders as well

The services are then stopped and the control panel removed from the desktop. The next message is that it will delete the files. Your response should be y for uninstalling the package.

OR . .
2. Manually delete the files

The installation can be uninstalled by deleting all the files under the \XAMPP\ folder, but there may be errors if you do not stop the services and check that nothing is running first.

  • Stop the services using XAMPP Control Panel
  • Untick the Svr button - so that mySQL and Apache are no longer running as services
  • Ensure that no other file is being used
Highlight the folder name and press Delete

There is also documentation on the XAMPP site about uninstalling.

Where Next?

You now have a Joomla! site to work with and some documentation to go with it.

Become familiar with Joomla! by altering and adding content.

  • Hands-on editing an article: Joomla! 1.6|Hands-on how to begin to edit an Article.

and

  • Hands-on adding a new article: Joomla! 1.6|Hands-on how to create a new Article.

Further information

  • Make use of the on-line Help for detailed information
  • Using the sample data. There is some documentation on the sample data on the sample website created on localhost.

Lorna Scammell February 2011