should I use a subdomain on live server for my development environment?

What are the pros/ cons of setting up a subdomain to use as a dev environment on the same server as a live webserver?

the pros for me are it’s already set up – dev.mysite.com, I dont need to worry about setting up another server with same config.

What are the other considerations about this?

Answer

You have outlined the only “pro” for using your production environment for development: It requires minimal setup time. The “cons” however are numerous.

Generally speaking your development and testing environment should be entirely separate from your live production environment — If your dev code has a bug that spews junk all over the production server’s filesystem, or worse starts deleting stuff from your production database, you will be in for a world of hurt trying to undo the damage.
A proper development environment also allows you to test things you’d never try to do in production (deleting scads of data for example) to see how the system behaves.

VMWare is cheap (in fact their free tools are great for setting up development environments), and decent hardware to run it on isn’t that expensive. Alternatively you can pursue other (workstation) virtualization solutions like VirtualBox for setting up a development environment.

Attribution
Source : Link , Question Author : undefined , Answer Author : voretaq7

Leave a Comment