Is it not necessary to add customization with a plugin in Elgg 2?

Starting from Elgg 2 you don't need a custom plugin

Why? I'm working with my first plugin for Elgg 2.0 and want to know about custom plugins in Elgg 2.x

  • Starting from Elgg 2, the installation directory *itself* is considered a custom plugin, if Elgg has been installed as a composer dependency.

    So instead of creating a custom plugin to e.g. override a view, you can simply drop the new view to the installation directory.

    The installation root also supports start.php. So again, no need for a custom plugin. Just add start.php and make the changes you need!

  • I make Elgg 2 sites like this:

    First on my local development environment:

    1. I install Elgg either by:
    2. I install the plugins I need using composer (e.g: "composer install juho-jaakkola/notifier")
    3. I make site-specific customizations directly to the installation root
    4. I commit everything (except vendor/ dir) to git

    Then on the production server:

    1. I clone the project I just made
    2. I run "composer install"
    3. Now my production site has identical versions of all the same plugins and customizations that I made in my development environment thanks to the composer.lock file!
  • Despite installation root working as a "plugin", generic features should of course still be made as separate plugins so that it's possible to share them to others.