/wordpress-custom-php-docker

🚀 A Docker-based setup for WordPress with custom PHP configurations, featuring MariaDB integration and easy extensibility. Perfect for tailored PHP environments!

Primary LanguageDockerfile

WordPress Docker Setup with Custom PHP Configuration

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

Features

  • 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.

Files Overview

  • 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.

Usage

  1. Clone the repository:
git clone https://github.com/fer-ri/wordpress-custom-php-docker.git wordpress
cd wordpress
  1. Start the services:
docker compose up -d
  1. Access WordPress at http://your-ip

Customizing PHP Settings

To adjust PHP settings, edit the custom.ini file:

max_execution_time = 180
max_input_vars = 5000
; ... your own settings

After making changes, rebuild and restart the containers:

docker compose up -d --build

Contributing

Feel free to open issues or submit pull requests to enhance this setup.

License

This project is licensed under the MIT License.