Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Dockerized

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Quickstart
  4. Usage
  5. Environment Variables
  6. Contact
  7. Checklist

Project Description

This repository provides a minimal and functional Docker-based setup for running WordPress locally. It uses the official WordPress and MariaDB containers via Docker Compose. All content is persisted using volumes, and the setup is ready to be deployed via Docker with a custom (optional) .env configuration.


Prerequisites

sudo apt update && sudo apt install -y docker.io

Project Structure

wordpress/
├── docker-compose.yml
├── .env                # Environment variables (manually created)
├── .gitignore
└── README.md

Quickstart

  1. Install dependencies:
sudo apt update && sudo apt install -y docker.io docker-compose git
  1. Clone the repository:
git clone https://github.com/BenjaminTietz/wordpress-docker.git
cd wordpress-docker


  1. Generate and configure the .env file:

The environment file will be created automatically from template.env. Adjust the values to match your setup (optional):

cp template.env .env
nano .env (optional)

  1. Start the project:
docker compose up -d
  1. Access WordPress:

Visit in your browser:

http://localhost:8080

Or, if deployed on a remote VM:

http://<your-vm>:8080

Usage

Environment Variables

All WordPress and MySQL credentials are configured via environment variables defined in the .env file:

Example:

WORDPRESS_DB_NAME=wordpress
WORDPRESS_DB_USER=wp_user
WORDPRESS_DB_PASSWORD=wp_pass
WORDPRESS_DB_HOST=db:3306

MARIADB_ROOT_PASSWORD=rootpass
MARIADB_DATABASE=wordpress
MARIADB_USER=wp_user
MARIADB_PASSWORD=wp_pass

Contact

👤 Personal

🌍 Social

💻 Project Repository

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors