The "sites" Directory - Mura Docs v7.1

The "sites" Directory

You can host multiple websites under one installation of Mura. Each website can have its own, unique domain, assets, groups, users, etc. That said, one important thing to keep in mind when working with theme development in Mura is to make sure you're working with the right directory.

{context}/sites/

Every Mura installation has a directory labeled "sites", located directly under the Mura root or context. This directory name should never be modified, under any circumstances. It contains one file, labeled the Application.cfc (see table below), and a minimum of one sub-directory.

Directory or File Editable Description
{context}/sites/Application.cfc Yes Required.
{context}/sites/default/ Yes Required. Each Mura installation also has a minimum of one site, labeled the "default" directory. The "default" directory name itself should not be modified, nor should any other Mura-generated directory name located under the "sites" directory. Doing so will break functionality. See below for more information on the "default" directory.

{context}/sites/default/

Every Mura installation has a directory labeled "default." This directory name should never be modified, under any circumstances. The directories and files located under the "default" directory comprise the "site" files for the "Default" site.

In addition to holding all of the "site" files for the "Default" site, the directory label is also the "Site ID," also referred to as the  "SiteID" (no space). To verify a site's SiteID, follow the steps below.

  1. From the back-end administration area of Mura, select Site Settings, then click Edit Settings.
  2. On the Site Settings screen, the first field located under the Basic tab is labeled "Site ID."
  3. The "Site ID" field is a "read only" field, and cannot be modified. This is intentionally designed to work this way.
  4. When creating a new site in Mura, you specify the Site ID. This is important, because whatever you enter into that field will become the directory name. So, do not use any punctuation, special characters, etc. when doing so. See the "How to Add a New Site" section for more information on creating a new site.

The key to remember here is each site in Mura has a unique SiteID which also matches the directory name. So, the path to any particular site you desire to work with can be notated as {context}/sites/{SiteID}/.

Note: Whenever you create a new site in Mura, all of the files located under the "default" directory are copied over to the newly created site's directory.

{context}/sites/{SiteID}/

As a Mura theme developer, you'll be spending most of your time working with files located within your theme. The directory structure of a Mura site is detailed below.

Directory or File Editable Description
{context}/sites/{SiteID}/assets/ Yes* Required. The "assets" directory stores any files uploaded through Mura's web file manager, currently CKFinder, when editing content via the user interface. It's best to simply use the web file manager itself to manage these files. However, we understand you may want, or need, to perform a bulk upload of files to a specific directory. When doing so, please be sure not to alter the primary directory structure, as you could potentially break links to files referenced here.
{context}/sites/{SiteID}/cache/ No Required. You should not touch this directory. Any images, files, etc. uploaded as actual content or primary associated files are renamed and stored here. References to all files are also stored in Mura's database.
{context}/sites/{SiteID}/modules/ Yes Optional. This directory contains the files Mura uses to render display objects in the browser. See The "modules" Directory section for more information.
{context}/sites/{SiteID}/resource_bundles/ Yes Optional. This directory contains ".properties" files containing locale-specific data as a way of internationalising Mura. See The "resource_bundles" Directory section for more information.
{context}/sites/{SiteID}/themes/ Yes Optional. This directory contains a site's themes. Themes stored under this directory are not accessible to any other site, unless the sites are using the same "Display Object Pool" as defined under Site Settings > Edit Settings > Share Resources tab. See The "themes" Directory section for more information.
{context}/sites/{SiteID}/.gitignore No Optional. The Mura Team uses Git for distributed version control, and this is the site .gitignore file used to specify intentionally untracked files.
{context}/sites/{SiteID}/contentRenderer.cfc Yes Optional. This is the Site contentRenderer.cfc file. You can add site-specific methods here. This is covered in the Mura contentRenderer.cfc section.
{context}/sites/{SiteID}/eventHandler.cfc Yes Optional. This is the Site eventHandler.cfc file. You can add site-specific event handlers/listeners here. This is covered in the Event Handlers section.
{context}/sites/{SiteID}/index.cfm No Required. This is the site's "start" file, and should not be modified.