Skip to content

demonmhon/wordpress-docker-dev

Repository files navigation

WordPress Docker Dev

The Stater WordPress development with Docker.

Getting started

Create new env file, update all variables with correct values

cp .env.sample .env

Start Docker Compose:

docker-compose up -d

Stop Docker Compose:

docker-compose stop

Remove Stop Container:

docker-compose down

File structure

Contain the mount volumes for Docker.

/
├── .db
├── plugins
├── theme-src
├── theme
│   ├── acf
│   ├── assets
│   ├── fonts
│   ├── img
│   ├── inc
│   ├── template-parts
│   └── templates
│       index.php
│       style.css
└── uploads

WordPress Installation

After start Docker compose. Then, Open the web browser and follow the installation instruction.

When the WordPress successfully installed. The database will be created and stored locally on /.db/data.

Required Plugins

The theme might not displayed properly without follow plugins:

WordPress configurations

  1. Login to the WordPress adminstration area.
  2. Open Themes setting from the menu Appearance > Themes
  3. Set the active theme
  4. Open Plugins setting from the menu Plugins > Installed Plugins
  5. Activate plugins

Theme development

Open the /theme and /theme-src. Then modify the files as needed.

The /theme-src designed for source of assets which doesn't required on production. So, they separated from theme.

Following the WordPress Developer Handbook for theme development. For the the theme's asset files (CSS, JavaScript), Node.js 10.x+ is required.

Plugins

Plugins should be ignored as it should be installed on installation site.

Uploads

Uploads are also ignored by default.

Prerequisites

Start the development

Install the required packages with npm:

npm install

Start the script to compile the assets and watch for the file changes:

npm start

Gulp will watch the file on /theme-src to compile to JS and CSS.

Bundle

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published