A month or so ago I created my first LAMP stack and implemented a simple web site that exercised each letter in that acronym. However my development setup was much less than ideal. I don't really have a local test server, but instead I was writing all of my CGI scripts in vim while ssh'ed into the remote machine as root. Now I intend to start more serious development.

Question: What is a good setup so that development goes as easily as possible?

I would like to understand what is available to me along the lines of an IDE, subversion (or alternatives), uploading and downloading content, and just best practices. I'm pretty new at all of this. Also, feel free to point me at good websites. There's plenty of websites, but only people who are already heavily developing web content are able to quickly determine if they are good websites.


5 Answers 5


Step 1: do not develop as root! I mean that in all sincerity.

Ideally you will need the following tools:

  • Source control, use what you like (Subversion works for me, others love Git or Mercurial)
  • A dev environment where you can run your website on the machine you are developing on--this dev environment should be running from your user account, not root. That may require you to run on a port above 1000 in a Unix environment (i.e. Apache running on port 8080 is common enough).
  • An IDE can help you code more efficiently and step through the source code as needed. If there are no IDE options for your platform (I know nothing of PHP IDEs or if there is such a thing), a good text editor is a must.

Also ideally, you will have a separate test environment. The test environment lets you have a machine that is most like what you intend to deploy on as possible. That will help weed out unexpected problems with the environment as early as possible. If that is not possible (i.e. a one man shop), at least have a different instance of the app pointing to a test database.


I've always liked Eclipse, but you can use whatever you like. The IDE doesn't need to be related to your deployment environment. Really you should be deploying through FTP or SCP or something similar, rather than editing code on the server. VI, EMACS, and other CLI editors are nice and all, but you really don't want to be doing all your development there. You'll go crazy.

You can absolutely run Subversion on a LAMP machine, though, of course, the usual warnings about development hardware vs production hardware apply. Obviously you'll want an IDE that will integrate with Subversion, but most serious ones will.

  • Both Eclipse and Netbeans offer good server integration. I'm not sure how well they support PHP, though.
    – TMN
    Commented Dec 28, 2010 at 18:03
  • @tmn: Eclipse at least has PDT (eclipse.org/pdt) which does pretty well for php. I've never been all that happy with the web design tools, but, really that's not the programmers problem ;) Commented Dec 28, 2010 at 18:07
  • @TMN Netbeans has a decent PHP & Subversion module. Git module is in beta (I think, haven't used it for months).
    – James
    Commented Dec 28, 2010 at 20:53

You never develop in some command line tool on the production machine :) That's just inconvenient.

Beside get yourself machine with SVN, nice IDE for your PC, and just do SVN up on production. It's as good as it can get.

  • 1
    It isn't just inconvenient, it is also risky. :)
    – Quentin
    Commented Feb 3, 2012 at 13:44

Test Enviroments:

cHave a look at http://bitnami.org/stack/lampstack there youi can find out of the box suse/ubuntu virtual machines to test your code as well as native packages to install on your system. Once your project is mature enough to run under "real live" conditions you can upload it to a free host like cloudcontoll. Unlike most free hosts cloud controll


PHP Eclipse is a good choice.

Source Contoll:

I prefer Bazaar because it does not require a server so you can work ofline if you have no internet connection.

This gives you a nice dev enviroment that runs on most laptops


I am a happy man while I use these.

  • Zend Community server this is your LAMP stack.
  • Eclipse, Netbeans or Zend Studio as your IDE (Google these names)
  • phpUnit for unit testing
  • last I will always prefer Mercurial over subversion as my code revision controller. (Read this tutorial on Mercurial. There is a bit of learning curve but you will be a satisfied individual at the end of the day)

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