Plugins must provide a start.php and manifest.xml file in the plugin root in order to be recognized by Elgg.


The start.php file bootstraps plugin by registering event listeners and plugin hooks.


This optional file is read by Elgg to configure various services, and must return an array if present. It should not be included by plugins and is not guaranteed to run at any particular time. Besides magic constants like __DIR__, its return value should not change.


Here’s a trivial example configuring view locations via the views key:


return [
        'views' => [
                'default' => [
                        'file/icon/' => __DIR__ . '/graphics/icons',

activate.php, deactivate.php

The activate.php and deactivate.php files contain procedural code that will run upon plugin activation and deactivation. Use these files to perform one-time events such as registering a persistent admin notice, registering subtypes, or performing garbage collection when deactivated.


Elgg plugins are required to have a manifest.xml file in the root of a plugin.

The manifest.xml file includes information about the plugin itself, requirements to run the plugin, and optional information including where to display the plugin in the admin area and what APIs the plugin provides.


The manifest file is a standard XML file in UTF-8. Everything is a child of the <plugin_manifest> element.

<?xml version="1.0" encoding="UTF-8" ?>
<plugin_manifest xmlns="">

The manifest syntax is as follows:


Many elements can contain children attributes:


Required Elements

All plugins are required to define the following elements in their manifest files:

  • id - This has the name as the directory that the plugin uses.
  • name - The display name of the plugin.
  • author - The name of the author who wrote the plugin.
  • version - The version of the plugin.
  • description - A description of the what the plugin provides, its features, and other relevant information
  • requires - Each plugin must specify the release of Elgg it was developed for. See the plugin Dependencies page for more information.

Available Elements

In addition to the require elements above, the follow elements are available to use:

  • blurb - A short description of the plugin.
  • category - The category of the plugin. It is recommended to follow the [[Plugin_Guidelines|plugin guidelines]] and use one of the defined categories. There can be multiple entries.
  • conflicts - Specifies that the plugin conflicts with a certain system configuration.
  • copyright - The plugin’s copyright information.
  • license - The plugin’s license information.
  • provides - Specifies that this plugin provides the same functionality as another Elgg plugin or a PHP extension.
  • screenshot - Screenshots of the plugin. There can be multiple entries. See the advanced example for syntax.
  • suggests - Parallels the requires system, but doesn’t affect if the plugin can be enabled. Used to suggest other plugins that interact or build on the plugin.
  • website - A link to the website for the plugin.

Siehe auch

Plugin Dependencies

Simple Example

This manifest file is the bare minimum a plugin must have.

<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest xmlns="">
        <name>Example Manifest</name>
        <description>This is a simple example of a manifest file. In this example, there are not screenshots, dependencies, or additional information about the plugin.</description>


Advanced example

This example uses all of the available elements:

<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest xmlns="">
        <name>Example Manifest</name>
        <author>Brett Profitt</author>
        <blurb>This is an example manifest file.</blurb>
        <description>This is a simple example of a manifest file. In this example, there are many options used, including screenshots, dependencies, and additional information about the plugin.</description>
        <copyright>(C) Brett Profitt 2014</copyright>
        <license>GNU Public License version 2</license>



        <!-- The path is relative to the plugin's root. -->
                <description>Elgg profile.</description>