{"id":14599,"date":"2020-02-19T23:03:27","date_gmt":"2020-02-19T22:03:27","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?post_type=dt_courses&#038;p=14599"},"modified":"2020-02-19T23:03:27","modified_gmt":"2020-02-19T22:03:27","slug":"install-wordpress-with-docker","status":"publish","type":"dt_courses","link":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/","title":{"rendered":"Install WordPress with Docker"},"content":{"rendered":"<div id=\"rdoc\">\n<p>This article shows how to <strong>install WordPress with docker<\/strong> for local development (on either <em>Windows<\/em>, <em>MAC<\/em> or <em>Ubuntu<\/em>) and for online production.<\/p>\n<p>The installation tool kit and setup files include:<\/p>\n<ul>\n<li><em>WordPress<\/em> files<\/li>\n<li><em>MariaDB\/MySQL<\/em> used for WordPress database<\/li>\n<li><em>phpMyAdmin<\/em> interface to connect to your MySQL database<\/li>\n<li><em>WP-Cli<\/em>: WordPress Command Line Interface<\/li>\n<li><em>Makefile<\/em> directives for automatization.<\/li>\n<\/ul>\n<p>You will learn:<\/p>\n<ul>\n<li>WordPress Docker directory structure<\/li>\n<li>Docker-compose and Wp-Cli configuration files<\/li>\n<li>Installing WordPress using docker-compose<\/li>\n<\/ul>\n<p>Contents:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#quick-start\">Quick start<\/a><\/li>\n<li><a href=\"#shutdown-and-cleanup\">Shutdown and cleanup<\/a><\/li>\n<\/ul>\n<\/div>\n<div id=\"quick-start\" class=\"section level2\">\n<h2>Quick start<\/h2>\n<p>You can automatically deploy a local docker wordpress site in 5 minutes using the following commands. Two options are available: <code>make<\/code> command and <code>docker-compose<\/code> standard commands.<\/p>\n<pre class=\"bash\"><code># Download a wordpress docker-compose example\r\ngit clone https:\/\/github.com\/kassambara\/wordpress-docker-compose\r\ncd wordpress-docker-compose\r\n\r\n# Use make command for automatic installation and\r\n# configuration of wordpress\r\nmake autoinstall\r\n\r\n# Or, use docker-compose standard commands\r\ndocker-compose up -d --build\r\ndocker-compose -f docker-compose.yml -f wp-auto-config.yml run --rm wp-auto-config<\/code><\/pre>\n<ol style=\"list-style-type: decimal;\">\n<li>Visit your wordpress website at <a class=\"uri\" href=\"http:\/\/localhost\">http:\/\/localhost<\/a>. Default identification for admin (<a class=\"uri\" href=\"http:\/\/localhost\/wp-login.php\">http:\/\/localhost\/wp-login.php<\/a>):<\/li>\n<\/ol>\n<ul>\n<li><code>Username: wordpress<\/code> and<\/li>\n<li><code>Password: wordpress<\/code><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/docker-compose-wordpress-woocommerce-and-wp-cli\/images\/wordpress-docker-compose-006-website.png\" alt=\"Website\" \/><\/p>\n<ol style=\"list-style-type: decimal;\" start=\"2\">\n<li>Visit your database via phpMyAdmin at <a class=\"uri\" href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a><\/li>\n<\/ol>\n<ul>\n<li><code>Username: root<\/code> and<\/li>\n<li><code>Password: password<\/code><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/docker-compose-wordpress-woocommerce-and-wp-cli\/images\/wordpress-docker-compose-007-phpmyadmin.png\" alt=\"phpMyAdmin\" \/><\/p>\n<\/div>\n<div id=\"shutdown-and-cleanup\" class=\"section level2\">\n<h2>Shutdown and cleanup<\/h2>\n<pre class=\"bash\"><code># Stop and remove containers\r\ndocker-compose down\r\n# Build, and start the wordpress website\r\ndocker-compose up -d --build\r\n# Reset everything\r\ndocker-compose down\r\nrm -rf mysql\/* wordpress\/*<\/code><\/pre>\n<div class=\"warning\">\n<p>Note that, instead of using the above <code>docker-compose<\/code> commands, you can also use easily the following <code>make<\/code> shortcut command lines if you have Unix systems (MAC \/ Linux).<\/p>\n<\/div>\n<pre class=\"bash\"><code># Build, and start the wordpress website\r\nmake start\r\n# Stop and remove wordpress docker containers\r\nmake down\r\n# Reset everything\r\nmake reset<\/code><\/pre>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.<\/p>\n","protected":false},"author":1,"featured_media":7840,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","class_list":["post-14599","dt_courses","type-dt_courses","status-publish","has-post-thumbnail","hentry","course_category-devops"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install WordPress with Docker - Datanovia<\/title>\n<meta name=\"description\" content=\"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install WordPress with Docker - Datanovia\" \/>\n<meta property=\"og:description\" content=\"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/\",\"name\":\"Install WordPress with Docker - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg\",\"datePublished\":\"2020-02-19T22:03:27+00:00\",\"description\":\"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Courses\",\"item\":\"https:\/\/www.datanovia.com\/en\/courses\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Install WordPress with Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"name\":\"Datanovia\",\"description\":\"Data Mining and Statistics for Decision Support\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install WordPress with Docker - Datanovia","description":"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/","og_locale":"en_US","og_type":"article","og_title":"Install WordPress with Docker - Datanovia","og_description":"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.","og_url":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/","og_site_name":"Datanovia","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/","url":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/","name":"Install WordPress with Docker - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg","datePublished":"2020-02-19T22:03:27+00:00","description":"Shows how to install WordPress with docker for local development (on either Windows, MAC or Ubuntu) and for online production.","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/P1030137.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/courses\/install-wordpress-with-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/"},{"@type":"ListItem","position":2,"name":"Courses","item":"https:\/\/www.datanovia.com\/en\/courses\/"},{"@type":"ListItem","position":3,"name":"Install WordPress with Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/#website","url":"https:\/\/www.datanovia.com\/en\/","name":"Datanovia","description":"Data Mining and Statistics for Decision Support","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/"}}]}},"multi-rating":{"mr_rating_results":[{"adjusted_star_result":0,"star_result":0,"total_max_option_value":5,"adjusted_score_result":0,"score_result":0,"percentage_result":0,"adjusted_percentage_result":0,"count":0,"post_id":14599}]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_courses\/14599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_courses"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/types\/dt_courses"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/comments?post=14599"}],"version-history":[{"count":0,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_courses\/14599\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media\/7840"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media?parent=14599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}