Trouble moving your Symfony 2 install to a new server?

nail-biting-nerdI just moved my biggest Symfony 2 site to a new server, and in doing so I made a couple of discoveries.

Discovery #1 – that .git folder? Pretty important.

Yeah, I thought I would save myself the megabytes by not uploading the .git folder. Oopsie.

Turns out that composer throws a fit if you don’t. My bad.

Easily rectified, right? Just upload the damn folder. Ooh the megabytes.

Discovery #2 – that vendors folder? Pretty useless.

The megabytes I saved not uploading the .git folder I figured were well spent on uploading the vendors folder.

Nope.

I ended up getting a funky error:

[RuntimeException]
 Failed to clone http://github.com/fabpot/Twig.git via git, https and http protocols, aborting.
- git://github.com/fabpot/Twig.git
 fatal: No such remote 'composer'

When trying to run composer update.

In the end I had to delete the entire vendors folder (sudo rm -rf vendors/) and re-run composer update.

The conclusion? So many wasted megabytes.

But hey, bandwidth is cheap, right?

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.