Dream Universal, Develop Local: A look at PHP Local Development Tools.
Tags: php, drupal, wordpress, symfony
Published: 2022-08-11 16:41:00

## Introduction

This article [originally appeared on Symfony Station](https://www.symfonystation.com/local-php-development-tools).

There is a plethora of local development tools to use with your PHP projects. In this article, we will explore the ones optimized for WordPress, Drupal, Laravel, and Symfony.

As a content creator and web designer that has to do some coding periodically, I look for simplicity. So, out-of-the-box functionality is key. Specificity is another one. Some local dev tools have these, and others don’t. But all of them are striving for it.

In my real-life work with [Mobile Atom Code](https://www.mobileatom.net/), I am starting several WordPress site creation and migration projects. I will be creating the new block-based themes that allow full site editing. So, I thought it was an appropriate time to explore local PHP development solutions.

Most local development tools provide you with a dev environment that includes a server, database, admin, and live browser preview of your project.

## Local PHP Development Tools

But, before we look at KISS options for people like me, let’s take a quick look at more full-featured ones.

Certain local dev tools work with any PHP development use case. They include MAMP, XAMPP, and Docker Desktop. I have worked with all of these to various degrees of frustration. Especially before I finished my full-stack bootcamp.

If you are a veteran programmer, you should be able to handle them with ease. If you are a newbie, not so much. 

Alright, let’s get started.

### MAMP

[MAMP](https://www.mamp.info/) has a Pro version and works with Windows and Mac. It also works with other programming languages like Python, Ruby, and Perl. It has quick setup options for WordPress and the Symfony-based CMSs Drupal and Joomla.

Like most of the tools we will explore, it provides Apache or Nginx, PHP, and MySQL to use locally for your project development. MAMP lets you run the PHP version of your choice and has a built-in IDE. 

An automated live preview in a browser is not one of its strengths.

[Learn more about MAMMP at their site](https://www.mamp.info/en/mamp-pro/windows/?m=1657615269&).

[Access the documentation here](https://documentation.mamp.info/).

### XAMPP

XAMPP is a stripped-down alternative to MAMP. According to Apache Friends, “it is an easy to install Apache distribution containing MariaDB, PHP, and Perl.” Downloads are available for Windows, Linux, or Macs.

[XAMPP is bare bones](https://www.apachefriends.org/download.html) although Bitnami does provide a module that [loads WordPress](https://bitnami.com/stack/xampp) on top.

Again, an automated live preview in a browser is not one of its strengths. Neither is documentation.

They do have FAQs for your operating system.

- [Linux FAQs](https://www.apachefriends.org/faq_linux.html)
- [Windows FAQs](https://www.apachefriends.org/faq_windows.html)
- [OS X FAQs](https://www.apachefriends.org/faq_osx.html)


### Docker Desktop

As you would expect, [Docker Desktop](https://www.docker.com/products/docker-desktop/) let’s you containerize your local development environment. It is available for Windows, Linux, and Mac. It’s the full mac daddy option. If you are building the next Spotify, this is for you. Several alternatives we will look at below, wrap Docker for ease of use.

[Access the manual here](https://docs.docker.com/desktop/).

### DDEV

“[DDEV](https://ddev.com/) simplifies integrating the power and consistency of containerization into your workflows.”

It’s wrapped around Docker.

A quick aside is warranted. Mobile Atom Code is moving into Drupal services so I am quite interested in DDEV. I have a theme development course purchased from [Drupalize.me](http://Drupalize.me) that I need to finish. It uses DDEV.

This option lets you develop locally with:

- PHP
- WordPress
- Drupal
- Backdrop (Drupal 7)
- TYPO3
- Magento

It has its sights on Node, React, Vue, Python, and Ember development as well.

Experienced developers should be comfortable with using DDEV.

[Read the docs here](https://ddev.readthedocs.io/en/stable/).

**Now, for some simpler and easier solutions.**


### PHP Sandbox

[PHP Sandbox](https://phpsandbox.io/) lets you “quickly prototype or share PHP Projects, without setting up a local environment.”

As the name implies it sets up online notebooks for you. You can expand these with Composer packages hosted on Packagist. Currently, it works with PHP 7.4 and 8.

 

A nice bonus is that you can embed the notebooks in your content creation process.

Notebooks are specialized for:

- Generic PHP
- PHP CLI
- React PHP
- Symfony
- Slim
- Laravel

You can use GitHub for imports and exports.

PHP Sandbox is great for general experimentation and exploration. It has added many features since I last explored it and appears headed toward being a solid production-friendly solution.

[Access the documentation here](https://docs.phpsandbox.io/).

## Framework Specific Development Tools

## Symfony

Symfony provides a local web server. It is not so much a local dev solution as an exploration tool that requires lots of configuration on your part.

“Although this server is not intended for production use, it supports HTTP/2, TLS/SSL, automatic generation of security certificates, local domains, and many other features that sooner or later you'll need when developing web projects. Moreover, the server is not tied to Symfony and you can also use it with any PHP application and even with HTML or single page applications.” says Symfony.

[If interested, peruse the documentation here](https://symfony.com/doc/current/setup/symfony_server.html).


## Laravel

Obviously, Laravel is not our thing. But here are some resources if it’s yours:

- [The current state of local Laravel development](https://aschmelyun.com/blog/the-current-state-of-local-laravel-development/)
- [Local Development with Laravel](https://dev.to/adamalicki/local-development-with-laravel-4nci)


## Drupal

As mentioned above, I am exploring Drupal local development.

### Lando

So, [Lando](https://lando.dev/) looks very promising to me. It provides “push-button development environments hosted on your computer or in the cloud.”

It too is wrapped around Docker. And it has extensive integration with your other development tools. If you love PHP Storm, Elasticsearch, or Platform.sh you’ll be happy. Lando also has hosting integration with Platform.sh, Acquia, Pantheon, and Lagoon.

It can work with WordPress, Drupal, Laravel and Symfony recipes as well.

[See the documentation for details](https://docs.lando.dev/).

### Drupal VM

“Drupal VM makes building Drupal development environments quick and easy, and introduces developers to the wonderful world of Drupal development on virtual machines or Docker containers.”

It is Linux based so there’s that. Obviously, this is not a simple solution but it’s an option I want to present. 

You can [learn more about Drupal VM here](https://www.drupalvm.com/).

[Find the docs here](http://docs.drupalvm.com/en/latest/).


### Acquia Cloud IDE

“Cloud IDE offers a best in class visual code editor and integrated Drupal development environment with everything you could need: Composer, Drush, Xdebug, code quality tools, Git support, and more.”

[This is an expensive solution](https://www.acquia.com/products/drupal-cloud/cloud-ide) from Drupal host Acquia. But, if you know what you are doing, host with Acquia, and money is no object, this is the way to go. No local machine headaches are required.

That’s not me yet, unfortunately.


## WordPress

### **@wordpress/env**

This WordPress package “lets you easily set up a local WordPress environment for building and testing plugins and themes. It’s simple to install and requires no configuration.” [@wordpress/env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) does require Docker on your computer as well as Node.js and NPM.

This is a solution for the experienced developer. And the most challenging to use. Again, not simple but I wanted to share it.


### Local

[Local by WP Engine](https://localwp.com/), is a solution I have used several times. They want you to host with them and provide this tool which deploys to their hosting very well. So if you are using them, this is the way to go.

However, there has been a fortunate development in WordPress dev. You can now export any theme you have activated and customized as a new theme within the WordPress admin itself. This means you can create your theme on any local development tool and export it to use with any hosting provider.

But, back to Local. As they say, it really is “an effortless way to develop WordPress sites locally.”

You select a few options and it spins up a local WP development environment with everything you need. This includes an Apache or NGINX server, MySQL database, WP Admin (backend), and a live preview. You can back it up to Dropbox or Google Drive.

[Get all the details here](https://localwp.com/features/).


### Dev Kinsta

I recently used [Dev Kinsta](https://kinsta.com/devkinsta/) to test some theme options for a project. I was quite happy with the results.

It too is wrapped around Docker and optimized for deploying to Kinsta hosting. NGINX and MariaDB are the server and database. Adminer is included as a database management tool. Dev Kinsta has HTTPS, error logging, and email testing.

It allows you to “design, develop, and deploy WordPress sites from the comfort of your local machine. DevKinsta is free forever, and available for macOS, Windows, and Ubuntu.”

[Explore the documentation here](https://kinsta.com/knowledgebase/devkinsta/).


### InstaWP

[InstaWP](https://instawp.com/) as a sandboxing solution like PHP Sandbox. However, you have to work quickly. The free option for notebooks expires after 48 hours. Paid plans can bump it to seven or fifteen days.

It’s perfect for testing themes and plugins or if you have two full days to work on a single project. You can deploy to any hosting solution if you want to use it for production rather than testing. 

I am definitely going to check InstaWP out for my upcoming projects.

[Take a look at the documentation](https://docs.instawp.com/).


### WP Stagecoach

Lastly, we have [WP Stagecoach](https://wpstagecoach.com/). It’s a staging solution rather than a local dev tool. But I wanted to share it as you can use it to develop a new theme for an existing site.

“WP Stagecoach is the easiest, fastest way to set up a WordPress staging site. It can then ‘push to live’ all (or some) of your site changes—again, with one click.”

[Explore the documentation here](https://wpstagecoach.com/knowledge-base/).

## Closing

As you have seen, there are many solutions for local PHP development. The easiest to use are targeted to WordPress and Drupal. But others work for any project.

I hope you found this article useful and discovered some new local dev options to explore.

Personally, I am impressed with PHP Sandbox, DDEV, Lando, Local, Dev Kinsta, and InstaWP.

So, go build something to conquer the universe! But before launching start developing it locally.