Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Single Container (WordPress + Nginx + Apache + phpMyAdmin + MySQL)

A Docker setup that runs WordPress, Nginx, Apache, PHP-FPM, phpMyAdmin, and MySQL inside a single container, with fixed resource limits:

  • CPU: 1.0
  • RAM: 1GB

1) Prerequisites

Make sure you have the following installed:

Verify installation:

docker --version
docker compose version

2) Clone the project

git clone <REPO_URL>
cd <PROJECT_FOLDER>

3) Start the stack (build + run)

docker compose up -d --build

This command will:

  • build the image,
  • create/start the container,
  • apply the 1 CPU + 1GB RAM limits from docker-compose.yml.

Where WordPress files are stored

WordPress files are written locally to:

  • ./httpdocs

This means you can view/edit them directly from your computer.

4) Open in browser

WordPress installer

phpMyAdmin

5) MySQL credentials (default)

From docker-compose.yml:

  • Root password: rootpass
  • DB name: wordpress
  • DB user: wpuser
  • DB password: wppass

6) Useful commands

Check container status

docker compose ps

View logs

docker logs -f wordpress-container

Stop everything

docker compose down

Full reset

docker compose down -v

Notes:

  • -v removes the MySQL volume.
  • WordPress files under ./httpdocs are a bind mount, so delete them manually if you want a fully clean WordPress install.

7) Verify resource limits

docker inspect wordpress-container --format 'NanoCpus={{.HostConfig.NanoCpus}} Memory={{.HostConfig.Memory}} MemorySwap={{.HostConfig.MemorySwap}}'

Expected output:

  • NanoCpus=1000000000 (1 CPU)
  • Memory=1073741824 (1GB)
  • MemorySwap=1073741824

8) Troubleshooting

"This site can’t be reached"

  • Make sure the container is running:
docker compose ps
  • If the container just restarted, wait 5–10 seconds and refresh.
  • Try the explicit port as well: http://localhost:8080/...

I want a clean WordPress installation

docker compose down -v
rm -rf httpdocs/*
docker compose up -d --build

9) WooCommerce plugin included

This repository includes a custom WooCommerce plugin:

  • ./plugins/wpck-woo-product-tag-cleaner

It is mounted automatically into WordPress at:

  • /wp-content/plugins/wpck-woo-product-tag-cleaner

Activate it

  1. Open WordPress admin.
  2. Go to Plugins.
  3. Activate WooCommerce Product Tag Cleaner.

What it adds

On Products list (/wp-admin/edit.php?post_type=product):

  • A bulk action: Remove tags from selected products (works on selected rows only).
  • A button: Remove all product tags (all products) (removes tags from every product).

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages