Skip to content
Helps you to protect your live environment (and others) by checking that all settings are what they should be.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

LimeSoda LiveGuard

Helps you to protect your live environment (and others) by checking that all settings are what they should be.

Build Status

Latest Release

Build Status Scrutinizer Code Quality

Development Branch

Build Status Scrutinizer Code Quality



You can use LimeSoda_LiveGuard to define "guards" that check if settings are what you expect them to be in the given environment.

A typical use case is to make sure that no production settings are used in non-production environments.



  • Tested with these Magento versions:

    • Magento CE -
    • Magento EE -

    Other versions may work too.

Installation Instructions

  1. Set an environment in your configuration XML (e.g. local.xml). See "Usage" for more information.
  2. Install the extension via modman.


Set an environment name

Very important: set a name for your environment before you install the extension!

Your shop won't run if this extension is installed and you didn't define an environment.

This happens to make sure that everything is configured properly and no guard is missed because of a misconfiguration.

Configure the environment in your XML. Normally you already should have defined the environment when you installed LimeSoda_EnvironmentConfiguration. Most of the time you will want to put this in local.xml as this file doesn't get shared between copies of the shop in most setups.


Add guards

Add guards by creating a new extension (or using an existing one) and adding new guards under the global > limesoda_liveguard > guards node in config.xml:

As with the environment setting this extension follows a defensive approach for the guards configuration. This means that you have to set active to false explicitly and add an environment to environments_to_omit if the guard should not be running in the specified environment.


What you define:

  • active: If the value is any other value than false the guard will be active.

  • environments_to_omit: The environments in which the guard should not be active. You can separate several environments with a comma.

  • class: A string identifying the guard class. You define this like you would define any other class (e.g. when defining an observer). This class has to implement the LimeSoda_LiveGuard_Model_GuardInterface interface.

Implementing a guard

A guard can be any class implementing the LimeSoda_LiveGuard_Model_GuardInterface interface.

The class only has to implement the method process.

Check what ever you want to check in this method and throw an Exception if the check fails (that is: a production environment is in danger).


  1. Remove the extension like any modman extension.


If you have any issues with this extension, open an issue on GitHub.


Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.



OSL - Open Software Licence 3.0


(c) 2013-2015 LimeSoda Interactive Marketing GmbH

You can’t perform that action at this time.