Updated: January 2nd, 2014
Note: It is important that your PHP environment match the Engine Yard production PHP environment as closely as possible.
The installation method you choose is going to be specific to your local system. The PHP documentation covers all the various installation methods in detail. And the MySQL documentation should also be helpful. Also note that pre-compiled packages exist for most systems, making installation a breeze. You shouldn’t usually have to install from source.
The easiest way to get a PHP app locally is by running:
$ php -S 127.0.0.1:8080 -t ./
This should work for most apps. But if you run into problems with this method, or need to test Nginx configs, you might need to configure a full Nginx setup.
Some important points to note:
- Check our stack information page to make sure you’re running versions of Nginx and PHP that are, preferably, at the same minor version number.
- If you’re using any extensions or modules, you should try to get their version numbers as close as possible to the versions we are running. In general, the closer you can get your
phpinfo()output to match our phpinfo() output, the better.
- We use APC as our opcode cache, so it’s a good idea to use that locally too.
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.