3rd Party (Free)
185 downloads (last 90 days)
EE Version Support
- ExpressionEngine 2
If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.
- Multi Site Manager
- Stand Alone Entry Form
- Low Variables
- Content Elements
- Better Workflow
- jQuery for the Control Panel
Having problems with relative upload paths in the EE2 CP? Greeny lets you use absolute paths to your upload directories and then corrects them for you automatically as you move from one server to another.
Greeny was written to solve a pretty simple problem that occurs when you move an EE2 database from one server environment to another. The problem being the “absolute” upload paths are wrong and you need to manually change them. In that past people tried to get around this using relative paths… but that method really sucked as many addons didn’t work well using relative paths.
With Greeny, you can use absolute paths and when you move your site, he’ll update them for you AUTOMATICALLY!
All you have to do is either:
1. Log into the CP or
2. Call the Greeny Action Path (found in the Module settings page)
It’s a dead simple “set and forget” system whereby all you have to do is install it. Once it’s running you’ll only notice Greeny is there when he goes to work after you’ve moved your DB from your Local environment to Stage or Production.
HOW IT WORKS
Greeny does a couple of things. The first thing he does is remember the root server path to each of your environments. He figures these out himself and saves them all in the DB.
The next thing he does is keep an eye out for any changes to this path. If he finds one, he’ll tell you about it. He’ll then try to figure out if the paths you have in your Upload Preferences match up with an old environment he knows about. If they do, he’ll update your paths for you so everything “just works”.
Finally, Greeny can also be called directly from a service like Beanstalk. Beanstalk allows you to poll a URL before or after you deploy a site update. By putting Greeny’s URL into these settings, your upload paths will be updated without you having to log into the CP.
3. Backup your site
4. Upload the “greeny” folder to /system/expressionengine/third_party/
5. Log in to your CP
6. Make sure you’re using absolute upload paths
7. Go to Addons > Modules > Greeny and click Install
8. Make a cup of tea and enjoy
HOW TO DISABLE GREENY
You may have some environments where you don’t want Greeny to do his thing. We’ve added a global variable to get around this issue. To disable Greeny, just set:
$config[‘greeny_enabled’] = false;
To do this with NSM Config Bootstrap, you’ll want to include something like this:
if (NSM_ENV == ‘local’) $default_config[‘greeny_enabled’] = “false”;
Above this line:
$config = array_merge($config, $default_config, $env_config);
You’ll be able to see if this has worked by checking the Greeny Accessory status. You should see this message:
“Greeny has been disabled in the config settings.”
SHARING A REMOTE DB
If any of your environments access the same database and have different filesystems you need to add one step for Greeny to work properly.
The ‘greeny_env’ config setting should be set in each environment that accesses a remote database. The value should be unique for each environment. A common example of this is having a team of developers working with local files but using a remote database to stay in sync with data. In this scenario each developer would need to use the config setting in their environment.
$config[‘greeny_env’] = ‘unique-key-per-person’;
This setting will be save to the database and serves as a “key” per developer. This allows for each developer to have their own upload directory base paths.
This will only work if this setting is unique to each developer. We achieve this by ignoring a developer-specific config override file per team member.
Props to Erik Reagan (@erikreagan) from Focus Lab, LLC for this feature!
BACKUP YOUR WEBSITE before installation as there is no warranty.
Q. Why Greeny?
A. Because he looks after your environment
Q. What versions of EE2 does Greeny roll with?
A. EE 2.1.3+
Q. I have a very important website which needs to stay online or the Queen of England will die. Should I install Greeny?
A. That depends… do you like the Queen? Greeny has proven itself to be stable enough for production sites but don’t turn your brain off - backup your site and then test everything properly before pushing ahead with this addon.
Q. I’ve found a bunch of bugs? Should I tell my mother?
A. No, tell me. Here: https://github.com/bliswebagency/Greeny/issues
Q. I’m not using the “exp_” naming convention for my DB tables - should I install Greeny?
A. No, not yet. Wait long by the river and a new version will float by that you can use.
Q. Why didn’t you call it “GreenEE”
A. Ummmm… well… next question.
Have fun. Hope this little guy makes working with EE2 across multiple environments a little easier.
|EE Support||Downloads||Add-On Version||Release Date|
|Not Specified||Download||1.0.3||Jul 21, 2011|
This entry was created July 18, 2011, 10:18 am.
This entry was last updated August 10, 2011, 4:57 pm.
Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!
Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email email@example.com.