kfiros / this-is-not-xampp
A template to set up a local PHP development environment using Docker
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
pkg:composer/kfiros/this-is-not-xampp
This package is auto-updated.
Last update: 2025-11-26 17:10:23 UTC
README
This is a simple docker-compose setup for local PHP development environment. It includes the following services:
- PHP -
php:8.2-apache - MySQL -
mysql:8.0 - phpMyAdmin -
phpmyadmin/phpmyadmin - xdebug (preconfigured to work with PhpStorm)
Requirements
Environment setup
Run the following commands to setup the project:
composer create-project kfiros/xampp-to-docker [project-name]
Alternatively you can copy the files to a directory or clone the repository.
Usage
- Run
docker compose upif you have docker 3.6 or newer, ordocker-compose upif you have an older version. - Open your browser and navigate to
http://localhostto see the magic (andhttp://localhost:8081for phpMyAdmin).
MySQL gotchas
- The MySQL data is stored in the
mysql-datadirectory. If you want to reset the database, you can delete this directory. - To access the MySQL database from your code, the host is
host.docker.internaland not127.0.0.1.
I have taken inspiration from jlucky/docker-php-dev-env that does the same thing but with nginx instead of apache. I have also added phpMyAdmin to the setup.