

Also notice how both the “phpmyadmin” and “wordpress” services use/depend on the “db” service.Ĭoncerning the database “db”, you may decide to use MySQL or MariaDB. This prevents an annoying error notice from phpMyAdmin where it complains about the PMA_HOST. Notice how all three services were placed on the same network called “mynet”. docker/php.ini:/usr/local/etc/php/conf.d/wp-php.ini I’m not going to go over every detail, but I will point out a couple of tricky parts. The docker-compose.yml file handles the creation of three services a MySQL database, a phpMyAdmin server and a WordPress server. Next, lets go over the fun part of this tutorial post. Note, you can change the filenames to whatever you wish, but make sure to change the volume references in the docker-compose.yml configuration. Even though we will be using docker containers, it’s still handy to export and import backups using this tool. This will allow us to run WordPress migration plugins such as the “All-in-One WP Migration”. I also increased the POST max size and UPLOAD max filesize to allow large files to be uploaded without problems occurring. I increased the memory and max execution time. This will provide us a nice custom ini file for your PHP application (WordPress).īelow is an example of what I used for my custom PHP ini settings. Any ini files place in conf.d will be parsed by PHP. This file will be copied to /usr/local/etc/php/conf.d/wp-php.ini on the WordPress service. Inside the docker directory, you should have created a php.ini file.
DOCKER PHPMYADMIN MARIADB HOW TO
Your base folder path will differ from ~/SItes/jjwdesign.įirst, let’s go over how to add custom php.ini settings. The structure should look similar to the screen shot image below.

Inside of your “ wordpress” folder should be your typical WordPress directories, such as wp-admin, wp-content and wp-includes. Also create an empty docker-compose.yml (yaml syntax) file for your compose configuration in your base project folder (jjwdesign for my example). Create an empty php.ini file in this “ docker” folder.
DOCKER PHPMYADMIN MARIADB DOWNLOAD
Download the WordPress application and extract it into a staring folder called “ wordpress“. Before starting, make sure you have Docker and Docker Compose installed. This is quick guide on how to use Docker and Docker Compose to set up and run WordPress with phpMyAdmin. You can even add a phpMyAdmin container, so you can easily get access to your WordPress database. Along with Docker Compose you can now easily run WordPress in an isolated environment built with multiple Docker containers. Docker is quickly becoming the preferred way to setup an environment for applications on your local machine.
