This is a boiler plate for starting WordPress development locally with Docker.
Before you get started, make sure you have installed Docker Desktop on your development machine.
You can set up your own custom VirtualHost domain for local development by modifying the server_config/wordpress.conf
file in the project directory.
All you need too do is update the ServerName
setting in the VirtualHost block to whatever you would like. This will be the domain you will use to pull the wordpress site up in your browser.
The current default ServerName
setting will pull up the local development site via the following domain:
http://wordpress.localhost
You can access this project's database using the defined ServerName
mentioned in the VirtualHosts section of this doc.
For example, the default path un-modified would be:
http://wordpress.localhost:8080
NOTE: All you do is add port 8080
at the end of your definee ServerName
!
You can install the latest version of WordPress by downloading the latest version via wordpress.org and placeing the WordPress core files inside of the public
directory.
After you have finished your Project Setup... all you should have to do is run the following terminal script via the root project directory:
docker-compose up
NOTE: Once complete, you will be able to pull up the WordPress site or PHPMyAdmin via the endpoints discussed above!
Once you are done developing, you can bring down this project's development environment by doing the following:
-
Hit ctrl-d in the terminal console running
docker-compose
scripts. -
Bring down the containers by running:
docker-compose down
-
You can verify which containers are running with the following terminal script:
docker container list
Note: You will not be able to run multiple projects if they share the same exposed ports!!!