What is the best way to deal with site configurations when building a site?

I am currently religiously using upgrade and install scripts for everything, meaning a zero configuration state when moving a site betweene environments etc.

However, some things in Magento just dont lend themselves to upgrade scripts and it is starting to become a little bit messy.

An example, is i am using the webshopapps matrix rate module and am writing an install script for my site that creates the required entries in the webshopapps shipping rate table.

However, in order to get that to work, i need to make my sites local module depend on the webshopapps module.

Really what I am asking here is what are the best practices for developing like this?


I would create a local extension that you would use for rewriting classes from other extensions, writing update scripts and call it something like XyzCore. This way you ensure having this kind of logic in one place.

You may also specify in your module-xml that it depends on other extensions. Here is an example taken from Mage_Api.xml:

                <Mage_Core />
  • How does this extend to setting up your http url vs https url, etc.? I think that's what the OP is getting at...
    – philwinkle
    May 6 '13 at 20:11

As binici says.

I implement a ProjectName_Install module and throw in all the stuff which should be configurated. What can be easily done is the configuration. Consider everything inside the <default>.

All other things are going into install scripts. If you need MatrixRates sure, just throw it in the depends, I don't see any problem with that.

<?xml version="1.0" encoding="UTF-8"?>
                <logo_alt>Some text</logo_alt>
                <welcome>Herzlich Willkommen bei xxx</welcome>
                <product_url_suffix />
                <category_url_suffix />
            <state_required />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.