Learn

Installing Add-Ons

Getting add-ons onto your site.

Add-ons come with up to two parts: the folder that contains the add-on code, and — optionally — a configuration file. An example folder structure for an add-on called my-add-on (that includes a configuration file) might look something like this:

_add-ons/
   my_add_on/
      pi.my_add_on.php
_config/
   add-ons/
      my_add_on/
         my_add_on.yaml

Here’s how to install each part, both of which should be an easy task.

Installing the Add-On’s Folder

To install the add-on, grab the named folder inside of _add-ons and drop it into your site’s _add-ons folder. That’s it. There’s nothing to activate, and no installers to run.

Installing the Add-On’s Configuration File

If the add-on did come with a configuration file (like in the example above), you’ll need to install that too. This is almost as easy as installing the folder.

First, check to make sure your copy of Statamic has an add-ons folder inside of its _config folder. If it doesn’t, make one.

Next, grab the named folder inside of the add-on’s _config/add-ons and drop it into your site’s _config/add-ons folder. Done.

Why the Configuration File Isn’t Inside the Add-On’s Main Folder

We thought you might be curious. The only part of the add-on that you’ll be changing is its configuration file. If you ever need to update the add-on, you’ll appreciate not accidentally overwriting your configuration settings with the default one that comes with the add-on.

That’s All, Folks

Once that’s in place, you should be all set. It’s good practice to double-check the add-on’s documentation to make sure you don’t need to do anything else; most of the time, you shouldn’t.

Feel free to configure and play with your brand new add-on.

This article was last updated on September 13th, 2016. Find an error? Please let us know!