Facebook Pixel

ExpressionEngine Multiple Environments Using Environmentall:EE Friendly

ExpressionEngine is our CMS of choice here at Black Belt Designs. ExpressionEngine is a great platform, but it does come with a few caveats. One of those is the lack of multiple environment configuration out of the box. Many people have come up with things throughout the growing years of ExpressionEngine. There have been solutions provided by many people. One of the most popular has been Master Config by FocusLab. The primary issue we kept seeing come up was developers and designers running into issues setting up the master config file or flat out not understanding how it worked.While we think it is always dangerous to mess with files, especially config files, when you don't know what they are doing, we saw and understood the need for some developers to still strive to use a multiple environment setup.

Hence the birth of Environmentall:EE Friendly. We wanted to take the pain away from those who didn't understand it and make it as easy as possible to setup and configure. We also wanted to make it safe by making sure the original files were being backed. This way if something goes wrong, all one needs to do is copy the backup config file and they are back in business. Another great thing is the usage of all of ExpressionEngine's default documentation and options in the settings. For instance, once installed, you can go to the ExpressionEngine settings Menu Manager and enable Environmentall:EE Friendly. Now Environmentall:EE Friendly will indicate which environment you are working in. Even better, doing it this way allows you to only display this for developers.

Since ExpressionEngine is used by developers world-wide, we even included language packs for English, French, German, and Spanish. 

So what is it and how does it work?

At Black Belt Designs we use multiple environments for all of our projects. We use our local environments for development and a production or live environment. Some agencies use a a staging environment for testing. We don't do that here since we backup our initial development and use the development build for testing. The problem is that ExpressionEngine only has one set of configuration files so there's no way to configure multiple databases or other settings independently. 

Environmentall:EE Friendly allows you to keep all of these settings within your ExpressionEngine setup and manage which environment you are working in auto-magically. 

How do I install it?

Just like any other addon installation, you just drop the Environmentall:EE Friendly themes folder in your public_html -> user -> themes folder and the Environmentall:EE Friendly addon folder inside of your system -> user -> addons folder. Once you have dropped your files in place, you head over to your Developer drop down and click on Add-On Manager. This will take you to your Add-On Manager within ExpressionEngine. You will see Environmentall:EE Friendly listed below in the Third Party Add-Ons section. Simply Click on Install and it installs. That's it. We have now installed the add-on. We have also written a backup file of the original config file should anything go wrong.

How do I manage my environments?

You don't need to worry about anything else really. Environmentall:EE Friendly handles everything for you. If you would like to manually manage your settings, feel free. The settings are available in a standard settings form. If you would rather allow Environmentall:EE Friendly to manage your settings, it's a simple matter of clicking two buttons.

Start by going to the settings screen. Click on the Environmentall:EE Friendly link in the Third Party Add-Ons screen after it installs. You can also click on the settings cog to the right of it.

Once there, you are given these same instructions. I'll write this with the assumption you are in your development stage and have this installed on a local development server using WAMPMAMP, or some other location.

That said, click on the Development link in the left rail. You will be shown two sections. The top section is for the path and URL settings. Since your site is already setup, you can click on the USE CURRENT button to retrieve these settings from your install. The bottom section is your database information. Again, no need to type everything in again, simply click the USE CURRENT button to retrieve these settings from your install and click on SAVE SETTINGS to save the information.

That's all you need to do in order to setup the development environment. We have now rewritten your config file to make modifications to the file and retract the proper environment config settings. We have also written an environmental config file in your system -> user -> config folder.

Once you set up a production environment, all you need to do is push your development files up to production and follow the same process as you did for your development. Keep in mind that if you named your production database differently then you will only want to push the add-on files until after you have saved your settings since the original config is written.

Is that it?

That's it really unless you want to display a marker for your environment so you always know which one you are working inside of at a glance. In order to do this and keep with some form of standards with ExpressionEngine, we utilized the menu button option. To enable this, simply click on your Control Panel Settings button. Once in your main settings, click on Menu Manager in the left rail under Content & Design. Here you can manage all of your menus for your user groups. Learn more about menu management here. Click on Manage in order to add the tag to your menu set. Once in edit mode you can click on ADD MENU ITEM. This will open the Edit Menu Item screen. Under Type, select Add-On. For Add-On, click on Environmentall:EE Friendly. Then Click Save. Once you have done this you will be returned to your Edit Menu Set. Click on SAVE MENU SET and you are all finished. You will now see an environment button named with the environment you are working in as a sub-menu button on your control panel. To keep with the standards, it is a functional button that will take you directly to the environment settings screen for that environment.

So that's Environmentall:EE Friendly. We hope you find it useful. If you have any questions, feedback, or requests, please let us know. We have already received some requests and are working on those now for a future release. 

Share this post

Comments

comments powered by Disqus