When working on localhost the URLs have begun with http://localhost/~macuser/example.com/ and the file paths have begun with a local file path.

What is the best way to deploy a site once it is finished?


3 Answers 3


IMHO, I suggest you start with a config file that will work irrespective of where your current environment is - there's a good gist here: https://gist.github.com/1329538

There's also a version of it here, but I haven't tested this one: http://ee-garage.com/nsm-config-bootstrap

After that, you'll want to get a good deploy workflow going. I suggest using GiT for your version control and Capistrano for the deploy phase. There is a really good guide on hive logic that should get you started: http://hivelogic.com/articles/deploying-expressionengine-github-capistrano

Finally, if you're migrating a db over, I suggest you look into REElocate plugin: http://devot-ee.com/add-ons/reelocate which is good for changing path variable in the database. This is a good way of uploading your database to the live server and then changing the values.

This is probably the best deploy setup I've come across so far for ExpressionEngine - most of the things that can usually get screwed up if you do them by hand are automated, and you can even roll back if something gets messed up during deploy.

It's a lot to learn if you've not used these technologies before, but well worth it! I heartily recommend learning as much as you can about both GiT and Capistrano! Good luck!

  • When you say to use Git for source control, do you mean to manage the Git source using an external service like BitBucket or do you mean to somehow push from my local machine to the server?
    – Lea Hayes
    Commented Dec 30, 2012 at 14:55
  • What I do personally is set up a local GiT repository during development, where I keep track of internal changes. When I'm ready to deploy, I set up an empty repo on the server, and push everything there. From then on, when I make changes to the files, I do it on my local machine, then push immediately to the server. YMMV but I'd wager that most servers that are capable of running ExpressionEngine will also let you to use SSH, and set up GiT that way.
    – apsdsm
    Commented Dec 31, 2012 at 1:04
  • Do you need to push to the server from your localhost, and then use SSH to pull those changes?
    – Lea Hayes
    Commented Jan 2, 2013 at 22:52
  • 1
    You'll need to SSH connect to your remote server to both push code, and also to pull code back down. Basically any time GiT talks to the remote server is via SSH. This is a good guide to using GiT: rogerdudler.github.com/git-guide As far as SSH to your remote server goes, the process may vary slightly depending on what OS you're on, and what server you're using. You'll have to read the docs for your web host, but here's a basic intro: polydistortion.net/doc/ssh.html - Hope some of this helps.
    – apsdsm
    Commented Jan 3, 2013 at 1:58
  • Thanks, I will need to spend some time practising this because it sounds tricky :S I am familiar with SSH, but I have no idea how the pushing part works. Thanks for the links, I will read through those tonight when I finish work.
    – Lea Hayes
    Commented Jan 3, 2013 at 14:31

If you're not currently using version control or config overrides to manage your paths... then I highly recommend, Deploy Helper by Hop Studios. It places almost all the configuration parameters you want or need to change on a single screen. Which makes transition from one server to the next, much easier. This works, when you just need to move the site to a new location, regardless if its an official deploy or you just changed development servers.

REElocate by Esp:resso is also a deployment helper. It works similar to Deploy Helper and was done by the same company that produces Store.

There is also Master Config by Focus Labs. Master config works a bit differently. It gives you a process to set-up and deploy to multiple environments. It's worth having in your toolkit, and can be used for a completed project, but probably works best when you are starting a project. At least that's my opinion, others may disagree.

There are a growing number of articles around using version control with ExpressionEngine, especially around Git. That's not something you want to get into in the middle of a deploy, but definitely something to look into. We're going to be using our first GitHub, ExpressionEngine deploy and management for a project that will launch in January.

If that is of interest to you (and it should be), then here are some recommended starting points:

(!)This one is my favorite reference point, just because its very close to how I want my set-up to be— local MAMP, Git, BeanStalk and Mountee.

I've been keeping a list of resources on the topic that I've found beneficial, you can access it here on Kippt. Hope this is helpful.

  • Helpful answer. I think in your first sentence you might mean, "If you're not currently using config overrides to manage your paths..." That would be the main reason to use Deploy Helper (not whether you use version control).
    – Alex Kendrick
    Commented Dec 31, 2012 at 20:43

I like to add this System Config Override variable to my config.php file...

$config['site_url'] = "http://localhost:8000/";

...then change it depending on your environment. This way at least I have one less thing to update in the database between environments. I prefer that type of configuration to be in PHP anyway.

Perhaps using more of the Config Overrides can remove the need for any configured URLs in the database.

EE 3 reference:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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