Skip to content

andrewwoods/docker-wordpress

Repository files navigation

Docker WordPress

Write a plugin or theme for the latest WordPress

This is the minimal setup you need to get a local WordPress development environment up and running quickly.

Version

The current version is 0.0.0. This project uses semantic versioning.

Features

  • Based on WordPress on 6.9 and PHP 8.3
  • Quick Setup of a new WordPress Environment

Ideas for sections/pages

  • Language Translations
  • Frequently Asked Questions (FAQ)
  • Screenshots
  • Submit Issues

Docker Commands

  • Run docker compose up -d to start your containers
  • Run docker compose down to stop your containers and keep your data
  • Run docker compose down -v to stop your containers and destroy your data

WordPress CLI

The WP-CLI interface has been added to the compose.yaml file. This makes it easier to administer a WordPress install.

The service name wpcli is needed to direct your commands to the right place. The rest of the command is passed to WP-CLI for processing.

Retrieve a list of all plugins, and show their status.

$ docker compose run --rm wpcli plugin list

Show the version info and program install locations.

$ docker compose run --rm wpcli --info

Show the web address (URL) of your website. Note: In a docker environment, the wpcli admin command isn't useful, since it can't open the browser on your host. Instead, use this command to print the siteurl value, and copy/paste it into your browser.

docker compose run --rm wpcli option get siteurl

The media-sizes package has been installed for your convenience. You may want to browse the available packages to see what else interests you.

docker compose run --rm wpcli media sizes

Use the mkplugin.bash script to simplify creation of new plugins

Check out a list of WP-CLI commands to see what it can do. Review the WP-CLI Handbook for access to additional resources.

Installation

  • Clone this repo
  • Run docker compose up -d
  • Access the site at http://localhost:8080
  • Complete the standard WordPress Install process
  • Create a Git Ignore file
    • Add the phpdocs directory to your .gitignore file
    • Add Editor-specific files to your .gitignore ( .swp for Vim, .idea for PHPStorm, etc. )
  • Select an Open Source License and copy it to LICENSE.txt
  • Update CONTRIBUTING.md to match your project needs

Optional Installation

Resources

Credits and Acknowledgments

About

Create a local WordPress development environment using Docker. Includes WP-CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors