Staging vs Testing server for PHP Staging vs Testing server for PHP php php

Staging vs Testing server for PHP


For me, a staging environment is one kind of testing environment.

The main point of the staging environment (servers, software and all) is that it's supposed to be quite close to the production environment :

  • same versions of software
  • same running daemons
  • same kind of physical servers
  • if using several servers in production, then have more than one server in staging -- to test load-balancing, for instance.
  • some real data (maybe a subset of your production data)

Basically, the staging environment should allow one to check if the application works in a production-like situation.


As for "testing" environments, I usually use this word for more than one kind of environments :

  • development machines : in a way, it's a testing platform, as developers have to unit-test their developments
  • automated-testing servers, with continuous integration
  • staging environment

Note that the first two environments will generally have more debugging /profiling / analysis tools that what you'll have on your production (and, so, staging) servers.


A testing server will differ from the live environment in a number of ways. It may be configured to display a lot of error information with error_reporting set to report all or most errors and display_errors on. It will probably also have some kind of debugging module like XDebug installed.

The staging server is a machine that is configured to be much closer to the live environment. It will have display errors turned off and won't have any debugging modules installed.

The reason for doing this is that code has a nasty habit of working great on the test/development environment and then spectacularly failing to work when it goes live. If this happens when you deploy your code it can knock your website off line until you find and resolve the issue. The staging server is a way of trying to keep such disruptions to a minimum.


  • Dev: Development (Developer works)
  • Test: Testing (Tester/QA works)
  • Staging: User Acceptance Test/Load Test/Performance Test
  • Production: Live