Mac PHP Development Environment

The “holy grail” of PHP development is a simple to maintain development environment that allows easy debugging and testing of your applications or add ons/plugins. I’ve chopped and changed over the years as products come and go and, in many cases (Adobe Dreamweaver, for example) become outdated and lag behind advances in PHP coding.

We currently recommend a combination of software solutions:

The heart of the environment is MAMP Pro. There is a free version of this available and a 30 day trial of the Pro version however the cost of the Pro version is pretty low and the comparative ease of use makes it a worthwhile spend. MAMP is also available for Windows but I’ve not tried it.

With MAMP Pro you can easily create a self contained environment to run and debug your PHP application with automatic host redirection and a full Apache, PHP, MySQL server that will handle multiple domains simultaneously.

When creating a site from scratch MAMP Pro offers the ability to automatically install packages onto your new project including Drupal, Joomla, webEdition and WordPress.

There are a number of tools bundled with the application but you should also install MacGDBp which can be launched from MAMP, allowing step by step debugging of your PHP code with variables display and pretty much everything else you’d expect from a debugging application.

For the actual editing and creation of your code, PhpStorm is the best tool out there at the moment in my opinion. The code completion is exceptional and even when using complex frameworks such as when using Propel, building a WordPress theme or plugin or a phpBB3 Extension all the system classes and methods are available for code completion.

PhpStorm understands namespaces and has special “modes” to make developing plugins etc… a lot simpler together with the ability to run and test code as well as check it for coding standards.

Despite the name perhaps suggesting otherwise, PhpStorm also has very good support for HTML (including HTML5), CSS and Javascript.

It’s worth using source control for all development projects and by using Git for this it can also be used as a way to deploy changes to your live server. Having said that, PhpStorm also has very good ftp support with full synchronisation available.