The importance of setting up a dev site locally

Hi all,

I was wondering if everyone could contribute the advantages of having a dev site set up locally on your machine or why you think this is important?

Obviously theres benefits such as speeding up the development process by not having to continually upload files to a live staging environment etc but I was just wondering what styles of development people adopt, does everyone use the local development route or are content making changes, uploading then testing etc?

Personally, I like to have dev where I can edit files and test them without having to upload everything, however, I know others who would rather write larger amounts of code and upload them to be tested in a batch.

The important one I always find, is to mirror your dev and live setup as close as possible (Windows dev to Linux live can cause awful problems for example with file name casing if you are not careful)

This is a great discussion as it’s very important. I don’t work locally but directly online and have a dev site for various software I use (WHMCS, Wordpress, Buddypress etc)


I agree with Tim, if doing local dev I set up a virtual machine in vmware that is an exact replica of the production hosting environment. For more casual work I use winscp connected to an editor so that I can easily open, edit and save directly on the server without having to do a separate transfer process.

Another advantage could be security during the testing phase and an additional backup of the data. It also depends upon the project in question and personal preference to what you choose but usually I’d use a localised system to begin with.

Though that’d depend how often you took a back up of live database data… Personally, I keep backups as a seperate system and don’t rely on the development as a ‘backup’ in its own right.

Hi Kyllle,

Absolutely, and for the reasons you mention. If you have a local instance you can work on the train, you can work in a field, you’re not dependent on an internet connection and it makes you faster and therefore more productive so you can bill more and go home earlier. :wink:

Except in very special cases it’s not a great idea to work on a live instance. The only times I would work directly to live is if something was broken and I had to fix it fast.

Of course it depends what you are making. If it’s just a couple of pages of static HTML or a low traffic personal wordpress blog then that should be fine :slight_smile:

Or a damn annoying bug that only seems to affect live, even tho live and dev are as close to a duplication as possible…yes… been there! :slight_smile:

I wasn’t really considering databases. I meant more as a precaution while editing and testing rather than letting it loose on a live site first. Not an actual backup more like a sandbox.

Ouch, yes, that has been known to happen, which brings us on to the next point, the importance of a staging server :slight_smile:

Still doesn’t help if its something that only appears to affect live.

Its good to have dev actually because it gives you to have your own backup in case if it is needed at times.

Hi Guys, cheers for the comments!!

Iv just started working as dev in a new company and we are in the process of getting ready for the handover of our new site from an external agency. Iv been asked to come up with what I feel is the best method of effective setup for our small in house dev team. Iv proposed the following.

Site source setup in a online repository with a CVS for site setup on local machines, a staging environment hosted in an internal server which has been setup to be as close to if not identical to the production/live server which is hosting the live site.

Developer commits changes to repository, local changes are then pushed to staging site for evaluation before being pushed to live.

Does this sound logical enough?

Thanks again guys!

That sounds very sensible, especially the part about deploying directly to stage from you versioning system. If I could just make one small suggestion, if your live box can take it I would strongly suggest putting your staging server on the same box as live, possibly under a subdomain. Good luck with it :slight_smile:

Hi goldfidget,

Thanks for the response, Il keep your subdomain advice in mind.

Thanks again!

Yep, that sounds like a sensible plan to go with - its what I basically use at work too.