Home > Articles > Web Development

How Joomla! Works

From the Rough Cut

From the Rough Cut

Tour of Joomla! Folders

Tour of Joomla! Folders

When you install Joomla, it installs the folders and files shown in the figure below.

Figure 1: Joomla! Version 1.6 Folders and Files

Note that, in a production version, the "installation" folder would normally be deleted, because keeping it around presents a security vulnerability. If you download Joomla using the SVN repository, you will get a folder called "tests" that contains the automated unit and system test files. These are removed when Joomla is packaged for normal installation.

Front End versus Back End

If you have used Joomla, you are familiar with the concept of the front end and back end (sometimes called the administrative back end). We can think of these are completely separate applications that happen to share some common libraries.

If you look at the sub-folders of the administrator folder, you will see many of the same folders that you see in the top-level folder. These include cache, components, includes, language, modules, and templates.

The administrator folder also has its own version of "index.php". So, when you enter the URL "http://mywebsite.org/administrator" it loads this file (administrator/index.php) which starts the administrator application. When you enter the URL "http://mywebsite.org" it loads the "index.php" file from the top-level folder, which starts the front-end application.

Each of these folders is discussed briefly below. Since the administrator folder it is similar in structure to the top-level, we will wait and discuss it last.


The cache folder is very easy to understand. This is just where we store our cached files. In a dynamic website, the system does a lot of work to pull together the information to display a page. For example, if the page is displaying a blog layout, the system has to access the database to get the articles for the blog; layout the articles on the page; and load the desired modules for the page.

In many real-life websites, the information for a page might stay the same for hours or days. So, if you have 50 users requesting the same page per hour, and the information is only changing once per day, you would be getting the exact same information from the database about 1,200 times (50 x 24) before the information actually changed.

With caching enabled, we try to reduce the number of times we access the database to get exactly the same information. In our example above, if we cache the page, we save a copy of the page in the cache folder for a specified period of time – perhaps 15 minutes. When the first user requests the page, it is compiled from the database in the normal manner, and a copy of the entire page is saved in the cache folder.

If a second user requests exactly the same information, the system first checks to see if there is a cached copy of the page that has not yet expired (less than 15 minutes old, in our example). If so, the page is read from the cached copy and we don't have to access the database or assemble the page. This allows the page to load much faster and also reduces the amount of work the server must do.

On a busy website where the frequency of viewing is greater than the frequency of database changes, caching can improve overall system performance dramatically.

The files in this folder are deleted when you select Site → Maintenance → Clear Cache or Site → Maintenance → Purge Expired Cache. If you run a large production site, you may also run a system-level job to remove unneeded cache files from this folder.


A component is normally the main thing on a given page and usually corresponds to a menu item. When you select an item from a menu, the page that loads contains the component defined by that menu item.

If we look at the sub-folders for components, we see each of the core components for Joomla: com_banners, com_contact, com_content (for articles), com_mailto, com_media, com_newsfeeds, com_search, com_users, com_weblinks, and com_wrappers. As you have probably figured out by now, the component folders all start with the letters "com_" followed by the component name. This is one example of strong naming conventions that are used throughout Joomla. We will discuss these later in this chapter.

If we look at the options when you are creating a new menu item for the core components, we have the options shown in the figure below.

Figure 2: Front End Core Menu Types

Most of these menu item types match up exactly to one of the folders. These include contacts, articles (which uses the com_content folder), newsfeeds, search, users, weblinks, and wrapper.

The components "com_banners", "com_mailto", and "com_media" do not correspond to menu item types. Banners are components but they get inserted into pages inside modules. When you click on the Email icon to email an article to someone, the com_mailto is the component that is called. "com_media" is the component that is called when you edit an article in the front end and you press the Image button to load the Media Manager.

These components do not display as the main thing on a page and therefore don't fit the simple definition of a component. This brings us to the more detailed and technical definition of a component, which is this. A component is an extension that has to take some action other than displaying something. For example, when you click on a banner, it has to write to the database to record the click and then perhaps redirect you to another URL. Similarly, when you click the Email icon, it has to offer you a form to fill out and then send the email. When you want to insert an image into an article, you are again taking actions, such as uploading an image to the web server.

So, in all of these cases, we need a component to handle these actions, even though these components will never be the central content of a page on our site.


The images folder is one place where image files for the site can be stored. For example, in the core distribution, we have sub-folders called "banners" and "sampledata". As you would expect, the banners folder stores images for the example banners that are included in the core distribution. The "sampledata" folder stores images that are used in the sample data that you can install (optionally) when you install Joomla.


You will notice that every sub-folder in the Joomla distribution (except administrator and installation, which contain "index.php" files) contains a file called "index.html". If you open this file in an editor, you will see the following content:


This is an HTML file with an <html> element and an empty <body> element. This file has no content and when displayed in a browser will show an empty page.

Why do we have these files everywhere? The answer is for security. If a user tries to browse to a folder, the web server looks for a file called "index.php" or "index.html" to load. If it can't find either of these files, the browser instead shows a list of files and sub-folders in that folder.

You can see an example of this by temporarily renaming the images/index.html to images/index1.html. Then, if you browse to the URL "<your Joomla root>/images", you will see something similar to the figure below.

Figure 3: Browser Window of Images Folder Without index.html File

If you rename the file back to "index.html" you will just see a blank page with this same URL.

Allowing an unauthorized user to see information about the files and folders on your server is considered a security problem. Someone who wants to hack your website can use this information to try to get more information and to probe the site for possible vulnerabilities. That is why every sub-folder in the system should contain a blank "index.html" file.


We mentioned earlier that the administrator folder, which controls the back end of the site, can be thought of as an entirely separate application from the front end of the site. For this reason, when we start a front end or back end session, we need to load different classes and constants into our session.

The includes folder contains the programs that are specific to either the front or back end application. So, the top-level includes folder loads the files that we need to get a front-end session started, whereas the administrator/includes folder has files we need to load to get a back-end session started.

The includes folder contains the following files:




creates the JSite class


defines constants for paths to files


loads commonly used portions of the Joomla! framework (also known as platform)


loads the entire site menu into memory


creates the JPathwaySite class, which is used in the mod_breadcrumbs module to show the path to the current menu item.


loads the JRouterSite class. We will discuss the router in more detail later in this chapter.

Figure 4: Files in Root "includes" Folder


The installation folder is a entire separate mini-application that does one thing -- the initial Joomla installation. When you initially start either a front or back-end session, the system checks for the presence of a file called "configuration.php" in the root folder. If it doesn't find this file, it assumes you need to run the installation and it loads the installation mini-application.

Since this is a self-contained mini-application, it has it's own "includes" folder as well as other folders needed to run the installation process. One of the great things about Joomla is how easy it is to install. Everything is done for you, including creating the database. This cool stuff is done in the installation mini-application.


Joomla is designed to be run natively in any of 63 (and counting) languages. As discussed in Chapter 2, virtually all text in Joomla is translated before it is shown in the browser. This is done by way of language packs, which install a set of language files. The "languages" sub-folder is where these language packs get installed.

With a standard English installation, we get two sub-folders: en-GB and overrides. The first folder holds all of the language files needed to translate the front end of the site into English. (The GB stands for Great Britain. The official English for Joomla is British English.)

The second folder is related to a new feature in version 1.6 – language overrides. Language overrides allow you to change the value of any text string without having to replace the entire language file. We will show an example of this in Chapter 5.

Note that there are often two language files per extension, one ending in ".sys.ini" and one ending in just ".ini". The ".sys.ini" files are loaded to get the name and description of the extension, for example, for showing in the Module Manager. We load the ".ini" file when we are actually working with the extension to show all of the text used by this extension.


A software library is a set of programs that are designed to be reused to perform a specific task or set of tasks. These software libraries are stored in sub-folders of the libraries folder.

In version 1.5, Joomla used 14 libraries. 13 were external libraries from third-party developers and one was the Joomla library.

In version 1.6, this has been reduced to four. The three external libraries are "phpmailer", used for sending email; "phputf8", used for some operations on UTF-8 text; and "simplepie", used for RSS feeds.

The library folder we are most interested in is the "joomla" folder. This folder contains the Joomla platform classes. We will discuss this in more detail later in this chapter.


This folder is used to store log files generated by Joomla. Events are logged based on certain conditions. For example, any error condition will be logged in a file called "error.log". In addition, turning on debug mode will cause some events to be logged.


The media folder holds CSS, Javascript, and image files for some of the components, modules, and editors. The system sub-folder contains, among other things, the mootools JavaScript framework, which is used in Joomla to supply certain JavaScript functionality. We will discuss JavaScript and Mootools in more detail in Chapter 11.


The modules folder contains a sub-folder for each front-end module available. The figure below shows the sub-folders on the left and a list of the Module Types you see when you create a new module in the Module Manager on the right.

Figure 5: Module Sub-Folders and Module Types

Each module type has it's own sub-folder. The table below shows which module names correspond with which sub-folder names.

Sub-Folder Name

Module Type Name



Archived Articles

Called mod_archive in version 1.5


Articles Categories

New in version 1.6.


Articles Category

New in version 1.6. Replaces mod_sections.


Latest News

Called mod_latestnews in version 1.5.


Articles - Newsflash

Called mod_newsflash in version 1.5.


Most Read Content

Called mod_mostread in version 1.5.






Custom HTML


Feed Display




Language Switcher

New in version 1.6.





Called mod_mainmenu in version 1.5.


Random Image


Articles – Related Articles






Syndication Feeds


Latest Users

New in version 1.6.



New in version 1.6.


Who's Online



Figure 6: Module Sub-Folders and Corresponding Types

When you install module extensions, they get added as sub-folders to the modules folder and become completely integrated into your Joomla application. We will discuss modules in detail in Chapter 7.


The plugins folder holds the plugins extensions. There are eight types of plugins, each with its own sub-folder, as indicated in the table below. Each plugin type deals with a specific type of activity on the site and fires events during these activities.

Folder Name

Where Used


During login to check user name and password


During content creation and editing


When loading standard editors (for example, TinyMCE)


When loading a custom editor (??)


When installing, updating, or uninstalling extensions


When searches are performed


At various points during the command execution cycle, including initializing the session, routing the request, dispatching, and rendering. We discuss this in more detail later in the section called "Anatomy of a Joomla Command Cycle".


When creating, editing, or deleting users and when users are logging in or out

Figure 7: Table of Plugin Types

We will discuss plugins in more detail in Chapter 6.


In Joomla, the content of each web page is separated as much as possible from the way the page is presented on the screen. The presentation is controlled by extensions called templates.

The templates folder contains a sub-folder for each front-end template that is installed on the system. In the default installation, this includes "atomic", "beez_20", and "beez5". This folder also contains a "system" folder. The "system" template has some layout information that is shared by all of the other templates and also is used by the system as a fall-back in case a CSS class or file can't be found in the named template.

We discuss the template folders in more detail in Chapter 5.


The "tmp" folder, as you might guess, is a place for the system to store files on a temporary basis. One of the most frequent uses of this folder is when extensions are installed. When a new extension is installed, a copy of the extension's archive file is copied into the "tmp" folder and then is unpacked into the correct Joomla folders.


As discussed earlier, Joomla can be thought of as two separate applications that share some of the same underlying code. These applications are the front end of the site and the administrative back end of the site.

This is evident when you look at the sub-folders under the "administrator" folder. The administrator folder contains many of the same sub-folders as the top-level folder, including: cache, components, help, includes, language, modules, templates, and the file index.php.

Figure 8: Contents of "administrator" folder

Adminstrator / Cache

This folder holds the cache files for the back-end of the site. When back-end pages are cached, the temporary cache files are stored in this folder.

Administrator / Components

This folder contains all of the components that are available in the back end of the web site. Every menu choice in the back end is provided by one of these components. The table below lists each component and the back-end menu options that it provides.

Folder Name

Administrative Menu Options


Help → Joomla Help, Site → My Profile, and Site → System Information


Components → Banners options


Site → Maintenance → Clear Cache, Site → Maintenance → Purge Expired Cache


Content → Category Manager, Components → Banners → Categories, Components → Contacts → Categories, Components → Newsfeeds Categories, Components → Weblinks → Categories


Site → Maintenance → Global Check-in


Site → Global Configuration


Components → Contacts options


Content → Article Manager, Content → Featured Articles


Site → Control Panel


Extension → Extension Manager


Extensions → Language Manager


Administrative Log-in screen, Site → Logout


Content → Media Manager


Menus → Menu Manager, Menus menu (this lists a menu option for each front-end menu defined for the site)


Components → Messaging


Extensions → Module Manager


Components → Newsfeeds options


Extensions → Plugin Manager


Components → Redirect *


Components → Search


Extensions → Template Manager


Users menu options (User Manager, Groups, Access Levels, Mass Mail Users)


Components → Weblinks

Figure 9: Front-end Components

* = New in version 1.6

Administrator / Help

This folder contains a file called "helpsite-16.xml". This file contains the list of available on-line help sites. Normally, when you press the Help button, you are linked to the on-line help at "docs.joomla.org".

There is also a folder called "en-GB" that contains and HTML file for each help topic. This allows for the option of having the help file on the local server. As shipped, the files in this folder simply redirect the user to the on-line help. But they can be overridden if desired to provide the help files locally.

Administrator / Includes

This folder serves the same purpose as the top-level "includes" folder discussed earlier. This folder holds the files we need to get a back-end session started, as shown in the table below.




creates the JAdministrator class


defines constants for paths to files


loads commonly used portions of the Joomla! framework (also known as platform)


checks if you are already logged in and sends you to the desired component option


loads the entire administrator menu into memory


loads the JRouterSite class. We will discuss the router in more detail in later in this chapter.


provides methods for loading the back-end toolbars

Figure 10: Administrator Includes Files

Administrator / Language

This is exactly the same as the top-level "language" folder, except that it is for the translation of the back-end of the site. Each component, module, plugin, and template has it's own language files.

Note that, like the front-end language files, we normally have a ".sys.ini" file and a ".ini" file for each extension. As discussed earlier, the ".sys.ini" file typically includes just the name and description of the extension for displaying in a list of extensions. The ".ini" file translates all of the text strings used by the extension.

Administrator / Manifests

This is a new folder for version 1.6 to support the new one-click update feature. It contains three sub-folders: "files", "libraries", and "packages".

The "files" folder contains a file called "joomla.xml" that lists all of the top-level folders and files in a standard Joomla installation. It also contains a list of update servers (URL's) where the program can look for updated versions of these files. This XML file tell the updater which files to update for this application.

The "libraries" folder contains an XML file for each library used in Joomla. These XML files list all of the folders and sub-folders in the library and, again, a URL where the program can check for updates to the library.

The "packages" folder also contains a file called "joomla.xml". This supports a method of updating the Joomla installation as a package instead of set of files. This feature is not implemented for version 1.6 but will be coming in a future version. It will support dependency relationships between extensions. For example, if you request to update or install extension A and that extension requires extensions B and C, these will automatically be included in the installation or update.

We will discuss one-click updates in more detail in Chapter 7.

Administrator / Modules

This folder serves the same purpose for the back end as the top-level "modules" folder serves for the front end. In contains one sub-folder for each back-end module. These are listed in the table below.

Figure 11: Back-End Modules

Each module type has it's own sub-folder. The table below shows which module names correspond with which sub-folder names.

Sub-Folder Name

Module Type Name


Custom HTML


Feed display


Latest News


Logged In Users


Login Form


Administrator Menu


Users Online


Popular Articles


Quick Icons


User Status


Admin sub-Menu






Unread Messages

Figure 12: Back-End Modules

Administrator Templates

This folder holds the templates used to display the back-end pages. Two templates are included with the standard implementation: "bluestork" and "hathor". Bluestork is the default template, Hathor is a template designed especially for accessibility. For example, Hathor is designed to work well with screen readers (used by people with visual impairments) and without using the mouse (for those who might have difficulty using a mouse).

As with the front end, we also include a "system" template that is used for common displays and as a fall-back if the assigned template is missing.

Administrator / index.php

This file is loaded automatically by the web server when your browser points to the administrator folder. It is the entry point for the back end of Joomla. It controls the back-end command cycle in the same way that the top-level "index.php" file controls the front-end command cycle. Note that, because we want the system to load this file, we don't need to have an "index.html" file here.


The following six files are found in the top-level Joomla folder. The table below describes the purpose of each.




Created after a successful installation. Contains settings that are specific to the site, such as the database connection information, and other settings. Most, but not all, of these settings can be edited in the Global Configuration screen in the back end.


This is a file that can be renamed to ".htaccess" and used with the "mod_rewrite" feature of the Apache web server. When used, it removes the "index.php" from all Joomla URL's and provides some additional security.


This is the file that starts all front-end page loads for the Joomla site. It is loaded automatically by the web server when you load any URL that points to the front end of the site (in other words, that does not point to the "administrator" folder).


Contains the text of the Joomla license agreement. Joomla is licensed under the GNU GENERAL PUBLIC LICENSE, Version 2, dated June 1991.


Contains some general information about Joomla.


Web robots is a term for programs that automatically traverse the web and gather information about web sites. Search engines, like Google and others, use robots to keep their indexes updated. Spammers and other bad guys use robots to gather email addresses and for other malicious purposes.

The robots.txt file included keeps the robots from accessing the sub-folders of your site.

Figure 13: Top-Level Files and Descriptions

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020