Understanding the Joomla directory structure

joomla-directory-structureUnderstanding the Joomla directory structure can be very handy if you really want to work with Joomla and develop new functionalities for it. This can be a little boring but this knowledge will benefit you when you start to do more advanced Joomla modifications, such as: create your own extensions or templates.


Before dipping into web development for Joomla, let’s take a look into Joomla directory structure.

When you extract Joomla 2.5 Pack in your server or personal computer, it will present the following files and directories.


Figure 1: Joomla root directory

Overview of each Joomla directory

Joomla directories names are very intuitive. For most of them, you can guess the folder content just seeing it name.  Basically we have these folders:

  • root: this is the directory where you made your Joomla pack extraction. When you first place Joomla on your web site, the root directory contains an index.php file that will run the Joomla installer. Once installed Joomla, this index.php page will detect your settings in the configuration.php file and execute your main Joomla engine.
  • administrator: In this directory you find all files for your Joomla administrator web interface (components, templates, modules, plugins, etc). The Administrator interface itself is a Joomla web site, and has a complete user interface that can be augmented by administrative extensions.
  • cache: This folder holds Joomla cache files. To accelerate performance, Joomla will cache popular pages requested in this directory, so they don’t have to be re-downloaded by PHP and MySQL for each time it is requested.
  • components: This directory holds all Joomla components, accept those for your administrator interface.  By default, Joomla has some components available, such as login, newsfeeds, poll, registration, search, and others. They are ready to go, and can already displayed them in your website front-end.
  • images: This folder by default holds images used for your extensions. It contains all bitmaps used by the administrator interface as well as images that have been uploaded to present with article content. Within it you find the \smiles folder that contains emoticons; the \stories folder that has images; and the \banners folder that holds some sample banner files.
  • includes: In this directory you find core files of Joomla. It contains PHP execution files that automate inclusion of content.
  • installation: This folder contains needed files for Joomla installation. It should be deleted after installed Joomla.
  • language: This folder holds all language files. Joomla stores translations in a simple INI-based file format. All languages files are contained in it own folder and have filename prefix that matches the folder name. For example, all language files for English template from the country Great Britain are stored in a folder named eng-GB and all of them has a prefix eng-GB.
  • libraries:  this directory holds your entire Joomla system and third-party libraries used in your website. A Joomla website uses the core libraries contained inside the \libraries folder. Within this folder you find the \joomla folder where you will see different implementations areas (such as file system, application, database,  etc). These implementations make up the functional parts of your application.  Its library has its own subfolder in this folder to aid in organization.
  • logs: Where Joomla stores its log files.
  • media: Default folder to store media files. It may contains files related with user interfaces, such as: JavaScript libraries, flash files, etc.
  • modules: This folder contains all installed front-end modules. It holds the modules available for display by a template. By default Joomla comes some modules, such as banners, breadcrumbs, latest news, login, newsflash, poll, random image, others. Modules are placed like panels into a Joomla template. They often encapsulate or provide the front-end display for related component. Like a component, a module is a type of add-on extension.
  • plugins: It contains all your plugins files. As well as components and modules, plugins are a type of add-on extension. However, they work at a lower level than components.
  • templates: This directory has all your frontend template files. You can notice that the name of each template subfolder must match the template it contains. By default Joomla brings some templates already done, and ready for use.
  • tmp: This folder stores temporary files and cookies that are used by the administrator and user interface of Joomla. Most of time, extensions’ files are copied to this folder during Joomla installation process.

Usually you don’t need to access these folders. Most of time, you will do your website modifications through the administrator interface of Joomla. However, if you want to modify a template with an external text editor you may do it accessing directly the source files in the Joomla directories. Now that we already know how Joomla files are organized we can start to create our own template (in the next article). So keep it up!

GET INTO A HEALTHY LIFESTYLE HABIT – Move More, Eat Real Food, and Get Outside.