As a developer probably you may have heard before about WordPress is a free and open-source blogging tool and a content management system (CMS) based on PHP and MySQL, which runs on a web hosting service. I was planning to install it using Docker for a containerized development environment, so I did researches and found a method to do it, but as I am using the recent Apple Macbook with an arm-based processor I found that due to lack of ARM support for MySQL I didn't find some developer-friendly method to get it started. So why not create one?!
If you want a quick start ๐๐ปโโ๏ธ you can access my WordPress + Docker repository to check it out!
Advantages
I decided to create something that makes it easier to start and use for your development environment with will also benefit you during production. The docker-compose.yml file has these advantages:
โ๏ธ 1 command to start
๐ฅ Ready for production and local development
โก Performance Optimized
๐ Works anywhere (Includes support for Apple Silicon Macs)
๐ Ease of development and managing different versions
Stack
- WordPress (Latest version)
- MySQL (Latest Version)
- Docker
How start using locally?
In your local environment you need to have installed:
- Docker
- Docker Compose
After cloning this repository, you can access the dev folder to be able to run the local dev environment using this command below.
git clone https://github.com/raihanameen/universal-wordpress.git
cd universal-wordpress
docker-compose up -d
๐ That's It! Now go to localhost/8080 to access the WordPress panel and get started with your projects.
Conclusion
Working in a Containerized Environment is an efficient way of developing applications, as it is completely isolated so that we can develop without worrying about breaking anything or having any system-specific issues which actually helps in developing larger applications that have a large team. So now no more "But It works on my machine"๐
If you liked my blog please give it a ๐๐ป and consider subscribing for more informative content. And If you have any suggestions or questions please drop them down in the comments section, I'd be glad to hear from you.
You also can follow me on these platforms: