Metavus Directory Structure

Top Level

These directories are at the top level of a Metavus installation:
/pages – Page-specific PHP files
/interface – User interface files (see below)
/objects – Supporting PHP class files
/plugins – Plugin files (see below)
/data – Static data
/install – Files used only during installation or upgrading
/lib – support libraries
/local – Site-specific files (all customizations go here – see below)


Under the /interface directory there are subdirectories for each available user interface (e.g. /interface/default).  Under each of those subdirectories, there are HTML files for each page, and the following subdirectories:
include – SCSS and JavaScript files for this interface
images – Image files for this interface
objects – Supporting PHP class files for this interface
fonts – Font files for this interface

So, for example, the images for the Metavus (default) interface can be found in /interface/default/images.  In addition there may be an interface.ini file in each interface directory, which contains for the interface.


Under the /plugins directory there are subdirectories for each plugin (e.g. /plugins/FeaturedItems).

In each plugin directory, there must be a class file for the plugin (like /plugins/Pages/Pages.php).  In addition there may be one or more subdirectories that contain files specific to the plugin, mirroring the top-level Metavus directory structure.  So, for example, the PageFactory class for the Pages plugin can be found in /plugins/Pages/objects/PageFactory.php and the HTML for the ListPages page for the Pages plugin can be found in /plugins/Pages/interface/default/ListPages.html.

For more information about the plugin directory structure and how to create and customize plugins, please see Creating Plugins.


The /local directory should contain all site customizations, and its structure mirrors the top-level Metavus directory structure.  If a file is present in the /local directory tree, it will be loaded instead of the same file in the main directory tree.  So if, for example, you wanted to replace the HTML file for the home page in the Metavus (default) interface, it would go in /local/interface/default/Home.html.

Also under the /localdirectory can be found a data subdirectory, which is used to hold data uploaded to or dynamically generated for the site, like uploaded images or compiled CSS files.

When upgrading Metavus, the /local tree is the only thing that is preserved between Metavus versions – everything else comes from the Metavus distribution package.