Need help with Drupal or Grav admin, site building, design, or content? Contact us!
Help Defend Democracy! â Join Battalion today.
Exploring the Symfony universe!
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 who has to do some coding periodically, I look for simplicity. So, out-of-the-box functionality is vital. 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, I 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âs 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.
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 boot camp.
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 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.
Access the documentation here.
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 although Bitnami does provide a module that loads WordPress 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.
As you would expect, Docker Desktop lets 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.
âDDEV 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 that I need to finish. It uses DDEV.
This option lets you develop locally with:
It has its sights on Node, React, Vue, Python, and Ember development as well.
Experienced developers should be comfortable with using DDEV.
Now, for some simpler and easier to use solutions.
PHP Sandbox 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:
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.
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.
Obviously, Laravel is not our thing. But here are some resources if itâs yours:
As mentioned above, I am exploring Drupal local development.
So, Lando 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.
â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.
â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 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.
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 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 by WP Engine, 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.
I recently used Dev Kinsta 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 used as 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.
InstaWP 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.
Lastly, we have WP Stagecoach. 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.
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.
Symfony Station covers the essential news in the Symfony, PHP, and Fediverse development communities with a focus on protecting democracy. Please use the button above to make a small donation to help cover our out-of-pocket costs. Our labor is provided free of charge to support the communities we write about.
Subscribe to The Payload, our weekly newsletter exploring the Symfony Universe.