WordPress is arguably the most widely used free and open-source CMS around the world and is not really going anywhere. About 43% of the global web is built on WordPress by bloggers, small businesses, and many other companies. If you are looking to build your own WordPress website and looking to host it on your own cloud instance or computer then this tutorial is just for you. Today we are covering how to set up and self-host WordPress with docker.
Docker Compose And WordPress Setup
Like most of my tutorials, I generally like to make use of docker-compose and our very first step is to compile the docker-compose YAML and copy it to our self-host instance. Copy the YAML code below and edit where it is applicable to your environment.
- TZ= #add your time zone here
Once logged in and copied to a directory within your docker host we can navigate to the directory with the Linux CLI and run
docker-compose up -d to deploy the WordPress containers. Once the docker-compose process is completed you can ensure that both containers are running with
docker ps and then open a browser tab and enter your docker host IP and it will take you to the install page below.
Once you entered all your website information and installed everything you will be redirected to the login screen
ip_addr/wp-admin where you can log in with the username and password you specified during the installation. From there you can modify your website and install and configure plugins within the WordPress dashboard.
In conclusion, WordPress is still the most widely used open-source cms and very much easy to use. If you enjoyed this article consider signing up for our newsletter and don't forget to share it with people that would find it helpful. Leave a comment below with a tutorial you would like us to cover.