This repository provides a Docker-based setup for running WordPress with a custom PHP environment. It uses docker compose to orchestrate services and includes a custom Dockerfile and custom.ini file to modify PHP settings.
Original post: https://ferrisutanto.com/wordpress-docker-custom-php-ini
- Customizable PHP Environment: Modify PHP settings such as
max_execution_time,max_input_vars, etc. - WordPress & MariaDB Integration: Pre-configured WordPress with MariaDB as the database.
- Simple Setup: Just clone, configure, and run.
docker-compose.yml: Defines the services (WordPress and MariaDB) and their configurations.Dockerfile: Extends the official WordPress image to include custom PHP settings.custom.ini: Contains PHP configuration overrides.
- Clone the repository:
git clone https://github.com/fer-ri/wordpress-custom-php-docker.git wordpress
cd wordpress- Start the services:
docker compose up -d- Access WordPress at http://your-ip
To adjust PHP settings, edit the custom.ini file:
max_execution_time = 180
max_input_vars = 5000
; ... your own settingsAfter making changes, rebuild and restart the containers:
docker compose up -d --buildFeel free to open issues or submit pull requests to enhance this setup.
This project is licensed under the MIT License.