{"id":3619,"date":"2023-06-25T20:21:58","date_gmt":"2023-06-25T17:21:58","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3619"},"modified":"2023-06-23T10:54:38","modified_gmt":"2023-06-23T07:54:38","slug":"how-to-install-wordpress-using-docker-compose","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/","title":{"rendered":"How to Install WordPress using Docker Compose"},"content":{"rendered":"\n<p>We will walk you through the process of installing <a href=\"https:\/\/en.wikipedia.org\/wiki\/WordPress\" target=\"_blank\" rel=\"noopener\">WordPress<\/a> using Docker Compose, allowing you to run your WordPress blog efficiently and effortlessly. WordPress is a popular content management system (CMS) that is used by millions of websites worldwide. Docker Compose, on the other hand, is a powerful tool for defining and running multi-container Docker applications. By combining these two technologies, you can easily set up and manage a WordPress installation and all of its dependencies.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_1_Install_Docker_and_Docker_Compose\" title=\"Step 1: Install Docker and Docker Compose\">Step 1: Install Docker and Docker Compose<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Install_Docker\" title=\"Install Docker\">Install Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Install_Docker_Compose\" title=\"Install Docker Compose\">Install Docker Compose<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_2_Set_Up_a_Project_Directory\" title=\"Step 2: Set Up a Project Directory\">Step 2: Set Up a Project Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_3_Create_a_Docker_Compose_YAML_file\" title=\"Step 3: Create a Docker Compose YAML file\">Step 3: Create a Docker Compose YAML file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_4_Start_the_Docker_Containers\" title=\"Step 4: Start the Docker Containers\">Step 4: Start the Docker Containers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_5_Access_Your_WordPress_Site\" title=\"Step 5: Access Your WordPress Site\">Step 5: Access Your WordPress Site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_6_Complete_the_WordPress_Setup\" title=\"Step 6: Complete the WordPress Setup\">Step 6: Complete the WordPress Setup<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Step_7_Stop_and_Start_Containers\" title=\"Step 7: Stop and Start Containers\">Step 7: Stop and Start Containers<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/#Final_Thoughts\" title=\"Final Thoughts\">Final Thoughts<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_1_Install_Docker_and_Docker_Compose\"><\/span>Step 1: Install Docker and Docker Compose<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before we begin, please ensure that you have Docker and Docker Compose installed on your system. Containerized applications require Docker, and Docker Compose is a tool specifically designed to orchestrate multi-container Docker applications.<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_Docker\"><\/span>Install Docker<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To get Docker up and running, you must first add the Docker repository and then install the Docker package. In the terminal, type the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code># sudo apt install apt-transport-https ca-certificates curl software-properties-common\n\n# curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg\n\n# echo \"deb &#91;arch=amd64 signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\n\n# sudo apt update\n\n# sudo apt install docker-ce docker-ce-cli containerd.io\n<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"233\" data-attachment-id=\"3620\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/attachment\/screenshot-2023-06-22-at-16-51-33\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?fit=2832%2C880&amp;ssl=1\" data-orig-size=\"2832,880\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-06-22-at-16.51.33\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?fit=750%2C233&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=750%2C233&#038;ssl=1\" alt=\"How to Install WordPress using Docker Compose\" class=\"wp-image-3620\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=1024%2C318&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=300%2C93&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=768%2C239&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=1536%2C477&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?resize=2048%2C636&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.51.33.png?w=2250&amp;ssl=1 2250w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_Docker_Compose\"><\/span>Install Docker Compose<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Then, run the following commands to install Docker Compose:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code># sudo curl -L \"https:\/\/github.com\/docker\/compose\/releases\/latest\/download\/docker-compose-$(uname -s)-$(uname -m)\" -o \/usr\/local\/bin\/docker-compose\n\n# sudo chmod +x \/usr\/local\/bin\/docker-compose<\/code><\/pre>\n\n\n\n<p>Run the following command to ensure that Docker Compose was successfully installed:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>docker-compose --version\nDocker Compose version v2.19.0<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_2_Set_Up_a_Project_Directory\"><\/span>Step 2: Set Up a Project Directory<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create a project directory to organize your WordPress installation and related files. Navigate to the desired location where you want to set up your project in your terminal. To make a new directory, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mkdir wordpress-project<br>cd wordpress-project<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_3_Create_a_Docker_Compose_YAML_file\"><\/span>Step 3: Create a Docker Compose YAML file<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next, in your project directory, create a YAML file called docker-compose.yml. The services and configurations required for your WordPress installation will be defined in this file. Open your text editor of choice and add the following to the docker-compose.yml file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>version: '3'\nservices:\n  db:\n    image: mysql:5.7\n    volumes:\n      - db_data:\/var\/lib\/mysql\n    restart: always\n    environment:\n      MYSQL_ROOT_PASSWORD: your_mysql_root_password\n      MYSQL_DATABASE: wordpress\n      MYSQL_USER: wordpress\n      MYSQL_PASSWORD: your_mysql_password\n\n  wordpress:\n    depends_on:\n      - db\n    image: wordpress:latest\n    ports:\n      - 8000:80\n    restart: always\n    environment:\n      WORDPRESS_DB_HOST: db:3306\n      WORDPRESS_DB_USER: wordpress\n      WORDPRESS_DB_PASSWORD: your_mysql_password\nvolumes:\n  db_data: {}<\/code><\/pre>\n\n\n\n<p>Make sure your_mysql_root_password and your_mysql_password are replaced with your desired MySQL root password and WordPress database password, respectively.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_4_Start_the_Docker_Containers\"><\/span>Step 4: Start the Docker Containers<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>After creating the docker-compose.yml file, run the following command to start the Docker containers:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>docker-compose up -d<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"345\" data-attachment-id=\"3621\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/attachment\/screenshot-2023-06-22-at-16-59-38\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?fit=2858%2C1314&amp;ssl=1\" data-orig-size=\"2858,1314\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-06-22-at-16.59.38\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?fit=750%2C345&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=750%2C345&#038;ssl=1\" alt=\"How to Install WordPress using Docker Compose\" class=\"wp-image-3621\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=1024%2C471&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=300%2C138&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=768%2C353&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=1536%2C706&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?resize=2048%2C942&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-16.59.38.png?w=2250&amp;ssl=1 2250w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>Docker Compose will begin pulling the necessary Docker images, setting up the containers, and configuring the network connections. This process may take a few minutes, depending on the speed of your internet connection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_5_Access_Your_WordPress_Site\"><\/span>Step 5: Access Your WordPress Site<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can access your <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-on-centos-8\/\">WordPress<\/a> site once the containers are up and running by opening a web browser and typing http:\/\/servers-IP:8000 into the address bar. The WordPress setup wizard should appear, guiding you through the initial configuration, which includes language selection, site title, username, password, and email address.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_6_Complete_the_WordPress_Setup\"><\/span>Step 6: Complete the WordPress Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To finish the installation, use the WordPress setup wizard. When you&#8217;re finished, you&#8217;ll be taken to the WordPress admin dashboard. You can then begin customizing your website by installing themes and plugins and publishing content.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"598\" data-attachment-id=\"3622\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-wordpress-using-docker-compose\/attachment\/screenshot-2023-06-22-at-17-00-23\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?fit=1664%2C1328&amp;ssl=1\" data-orig-size=\"1664,1328\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-06-22-at-17.00.23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?fit=750%2C598&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?resize=750%2C598&#038;ssl=1\" alt=\"\" class=\"wp-image-3622\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?resize=1024%2C817&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?resize=300%2C239&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?resize=768%2C613&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?resize=1536%2C1226&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-22-at-17.00.23.png?w=1664&amp;ssl=1 1664w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_7_Stop_and_Start_Containers\"><\/span>Step 7: Stop and Start Containers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To stop the running containers, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>docker-compose down<\/code><\/pre>\n\n\n\n<p>This command will terminate and remove the containers while retaining the data in the database volume. If you want to restart the containers later, go to your project directory and run docker-compose up -d.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Congratulations! WordPress was successfully installed using Docker Compose. This method creates a flexible and portable environment that allows you to run your WordPress blog. You can easily manage your WordPress installation by leveraging the power of Docker, ensuring scalability and consistency across different environments. Have fun exploring WordPress&#8217;s vast possibilities, and happy blogging!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We will walk you through the process of installing WordPress using Docker Compose, allowing you to run your WordPress blog efficiently and effortlessly. WordPress is a popular content management system (CMS) that is used by millions of websites worldwide. Docker Compose, on the other hand, is a powerful tool for<\/p>\n","protected":false},"author":8,"featured_media":3624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[541,543,536,544,537,538,540,542,539],"class_list":["post-3619","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-docker-compose-yaml-file","tag-docker-containers","tag-install-docker","tag-install-docker-compose","tag-install-wordpress-docker","tag-install-wordpress-docker-compose","tag-wordpress-docker","tag-wordpress-docker-compose","tag-wordpress-yaml-file"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-WordPress-using-Docker-Compose.png?fit=600%2C330&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-Wn","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3166,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-docker-engine-on-ubuntu\/","url_meta":{"origin":3619,"position":0},"title":"How to Install Docker Engine on Ubuntu","author":"George B.","date":"April 5, 2023","format":false,"excerpt":"What is Docker Engine? Docker Engine is an open-source client-server technology that builds and runs containers using Docker components and services. It acts as a containerization technology that allows users to interact with the Docker daemon through the Docker Engine API. Docker Engine has a declarative model that automatically adjusts\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-Docker-Engine-on-Ubuntu.png?fit=600%2C340&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-Docker-Engine-on-Ubuntu.png?fit=600%2C340&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Install-Docker-Engine-on-Ubuntu.png?fit=600%2C340&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3608,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-gitlab-ce-with-docker-on-ubuntu-22-04\/","url_meta":{"origin":3619,"position":1},"title":"How to Install GitLab CE with Docker on Ubuntu 22.04","author":"George B.","date":"June 24, 2023","format":false,"excerpt":"Introduction You can quickly set up your own GitLab instance, manage your repositories, and take advantage of its powerful features by installing GitLab CE with Docker. We'll walk you through the steps of installing GitLab CE with Docker on Ubuntu 22.04, ensuring a smooth installation and configuration. We'll also go\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-GitLab-CE-with-Docker-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-GitLab-CE-with-Docker-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-GitLab-CE-with-Docker-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3626,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-configure-a-private-docker-registry-in-ubuntu-22-04\/","url_meta":{"origin":3619,"position":2},"title":"How to Configure a Private Docker Registry in Ubuntu 22.04","author":"George B.","date":"June 26, 2023","format":false,"excerpt":"There are situations where you might want to set up your own private Docker registry even though Docker Hub offers a public registry for storing and sharing Docker images. In this guide, we'll show you how to set up a private Docker registry on Ubuntu 22.04 so you can manage\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Configure-a-Private-Docker-Registry-in-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Configure-a-Private-Docker-Registry-in-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Configure-a-Private-Docker-Registry-in-Ubuntu-22-04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3954,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-docker-swarm-on-ubuntu-22-04\/","url_meta":{"origin":3619,"position":3},"title":"How to Install and Configure Docker Swarm on Ubuntu 22.04","author":"George B.","date":"September 27, 2023","format":false,"excerpt":"This tutorial will show you how to install and configure Docker Swarm on Ubuntu 22.04 ensuring that you harness its full potential for your containerized applications. For effectively scaling and managing containers, Docker Swarm is still a great option. Many developers and DevOps experts prefer it because of its ease\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-and-Configure-Docker-Swarm-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2296,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/docker-installation\/","url_meta":{"origin":3619,"position":4},"title":"Docker Installation","author":"Shreyash Sharma","date":"March 8, 2021","format":false,"excerpt":"I suggest you get machine to follow along this part. So here's a little plug of our own: Cloud VPS, for as little as \u20ac2.95 a month. This article is a part of our complete series of articles on Docker. Click here to access the Free Series. While Docker was\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2021\/03\/12122013Docker_twitter.png?fit=750%2C375&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2021\/03\/12122013Docker_twitter.png?fit=750%2C375&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2021\/03\/12122013Docker_twitter.png?fit=750%2C375&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2021\/03\/12122013Docker_twitter.png?fit=750%2C375&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3821,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-deploy-zipkin-on-kubernetes\/","url_meta":{"origin":3619,"position":5},"title":"How to Deploy Zipkin on Kubernetes","author":"George B.","date":"September 6, 2023","format":false,"excerpt":"This tutorial will walk you through setting up Zipkin on Kubernetes, assuming that you already have K3s and Helm set up. Microservices have become a key element in the quickly changing world of software development. Distributed tracing systems like Zipkin have become very popular in tandem with this explosion in\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Deploy-Zipkin-on-k3s.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=3619"}],"version-history":[{"count":2,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3619\/revisions"}],"predecessor-version":[{"id":3625,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3619\/revisions\/3625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3624"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}