Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Docker

This project provides a ready-to-use Docker Compose environment for running WordPress with MySQL and Nginx.

Project Structure

wp-docker/
├── app/
│   ├── sql/
│   │   └── init.sh          # MySQL initialization script
│   └── src/
│       └── wp-config.php    # WordPress configuration
├── nginx-conf/
│   └── nginx.conf           # Nginx server configuration
├── docker-compose.yml       # Docker Compose setup

Prerequisites

Setup Instructions

  1. Clone the repository

    git clone https://github.com/ramkumar2098/wp-docker
    cd wp-docker
  2. Create environment files

    • Copy the sample environment files:
      cp .env.sample.php .env.php
      cp .env.sample.mysql .env.mysql
    • Edit .env.php and .env.mysql to set your own credentials and secrets.

    Note: The .env.sample.php and .env.sample.mysql files contain example values for MySQL and WordPress configuration. You must update these values for your local setup. Make sure to generate and set strong WordPress salts and keys in your .env.php file.

  3. Start the services

    docker compose up -d
  4. Access WordPress

Stopping Services

docker compose down

Troubleshooting

  • If you encounter permission issues, try running Docker commands with sudo.
  • Ensure ports 8080 (Nginx) and 3306 (MySQL) are not in use by other services.
  • Check logs with docker compose logs for more details.

License

MIT © 2025
View LICENSE

About

Run WordPress locally using Docker, Nginx, and MySQL.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages