html
Copy code
Reading Time: 3 minutes
Hello, today we are going to learn how to set up a WooCommerce store using WordPress directly with Docker Compose.
![](https://i0.wp.com/images.pexels.com/photos/2536965/pexels-photo-2536965.jpeg?w=900&ssl=1)
In today’s e-commerce landscape, having a solid and versatile platform is essential for the success of any online business. WordPress and WooCommerce have become a powerful combination for creating attractive and functional online stores. If you’re looking for an efficient and isolated way to deploy WordPress and WooCommerce in your development environment, Docker is the solution you’re looking for.
Docker has revolutionized the way we build, deploy, and manage applications. It provides lightweight and portable containers that encapsulate all the necessary dependencies to run an application consistently in any environment. In this article, we will explore the steps to install WooCommerce alongside WordPress using Docker, allowing you to have a flexible and isolated development environment without worrying about dependency conflicts or complicated configurations.
Below, I have set up the following environment in a Docker Compose file:
version: "3.1" services: miservicio_mariadb_wp_woocommerce: image: mariadb restart: unless-stopped container_name: miservicio_mariadb_wp_woocommerce environment: MYSQL_ROOT_PASSWORD: passWordRoot MYSQL_DATABASE: WordPress volumes: - ./config/mariadb:/var/lib/mysql ports: - 3306:3306 networks: - docker-network phpmyadmin_wp_woocomerce: image: phpmyadmin restart: unless-stopped container_name: phpmyadmin_container_wp_woocomcerce ports: - 8080:80 environment: - PMA_ARBITRARY=1 links: - miservicio_mariadb_wp_woocommerce:db networks: - docker-network wordpress_woocommerce: image: wordpress restart: always container_name: wordpress_woocommerce environment: WORDPRESS_DB_HOST: miservicio_mariadb_wp_woocommerce WORDPRESS_DB_USER: root WORDPRESS_DB_PASSWORD: passWordRoot WORDPRESS_DB_NAME: WordPress volumes: - ./www:/var/www/html - ./plugins:/var/www/html/wp-content/plugins networks: - docker-network networks: docker-network: driver: bridge external: true
In this file, we have deployed a mariadb server, a phpmyadmin for managing the server, and the official WordPress container. We have also specified to use the www path (external folder in our directory) to store Docker files. Additionally, we’ve added the plugins folder where we store WordPress plugins.
Now we can launch it using the following command:
docker compose up -d
With this command, we launch the entire environment.
Once installed, we can start configuring it:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-10.png?resize=682%2C631&ssl=1)
Once you have selected the language, configure the rest of the fields.
Now, configure the site name and other details:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-11.png?resize=646%2C529&ssl=1)
Next, go to “Appearance” and select a theme.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-12.png?resize=422%2C192&ssl=1)
Search for storefront
.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-13.png?resize=900%2C374&ssl=1)
Install it.
Now, go to “Plugins” and search for woocommerce
.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-14.png?resize=900%2C341&ssl=1)
Install the first one that appears.
And now, your store is ready to start adding products.
In the following tutorials, I will explain how to add products.
Reading Time: 3 minutes
Hello, today we are going to learn how to set up a WooCommerce store using WordPress directly with Docker Compose.
![](https://i0.wp.com/images.pexels.com/photos/2536965/pexels-photo-2536965.jpeg?w=900&ssl=1)
In today’s e-commerce landscape, having a solid and versatile platform is essential for the success of any online business. WordPress and WooCommerce have become a powerful combination for creating attractive and functional online stores. If you’re looking for an efficient and isolated way to deploy WordPress and WooCommerce in your development environment, Docker is the solution you’re looking for.
Docker has revolutionized the way we build, deploy, and manage applications. It provides lightweight and portable containers that encapsulate all the necessary dependencies to run an application consistently in any environment. In this article, we will explore the steps to install WooCommerce alongside WordPress using Docker, allowing you to have a flexible and isolated development environment without worrying about dependency conflicts or complicated configurations.
Below, I have set up the following environment in a Docker Compose file:
version: "3.1" services: miservicio_mariadb_wp_woocommerce: image: mariadb restart: unless-stopped container_name: miservicio_mariadb_wp_woocommerce environment: MYSQL_ROOT_PASSWORD: passWordRoot MYSQL_DATABASE: WordPress volumes: - ./config/mariadb:/var/lib/mysql ports: - 3306:3306 networks: - docker-network phpmyadmin_wp_woocomerce: image: phpmyadmin restart: unless-stopped container_name: phpmyadmin_container_wp_woocomcerce ports: - 8080:80 environment: - PMA_ARBITRARY=1 links: - miservicio_mariadb_wp_woocommerce:db networks: - docker-network wordpress_woocommerce: image: wordpress restart: always container_name: wordpress_woocommerce environment: WORDPRESS_DB_HOST: miservicio_mariadb_wp_woocommerce WORDPRESS_DB_USER: root WORDPRESS_DB_PASSWORD: passWordRoot WORDPRESS_DB_NAME: WordPress volumes: - ./www:/var/www/html - ./plugins:/var/www/html/wp-content/plugins networks: - docker-network networks: docker-network: driver: bridge external: true
In this file, we have deployed a mariadb server, a phpmyadmin for managing the server, and the official WordPress container. We have also specified to use the www path (external folder in our directory) to store Docker files. Additionally, we’ve added the plugins folder where we store WordPress plugins.
Now we can launch it using the following command:
docker compose up -d
With this command, we launch the entire environment.
Once installed, we can start configuring it:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-10.png?resize=682%2C631&ssl=1)
Once you have selected the language, configure the rest of the fields.
Now, configure the site name and other details:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-11.png?resize=646%2C529&ssl=1)
Next, go to “Appearance” and select a theme.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/08/imagen-12.png?resize=422%2C192&ssl=1)
Search for storefront
.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/07/cropped-light_logo-5.png?resize=100%2C100&ssl=1)