Skip to content

dreamhighcodestar/wordpress_docker

Repository files navigation

WordPressify

WordPressify

A Docker-based WordPress development environment that simplifies your workflow.

🚀 Features

  • Docker-based Development Environment: Run WordPress, MariaDB, and Node.js in isolated containers
  • Modern Development Workflow: Gulp tasks for CSS/JS processing, live reloading, and more
  • Block-based Theme Support: Default theme uses modern WordPress block-based architecture
  • Code Quality Tools: PHP CS Fixer for PHP and Prettier for HTML, JavaScript, and CSS
  • Easy Export: Generate production-ready themes with optimized assets
  • Backup System: Create backups of your entire WordPress installation

🔧 Prerequisites

  • Docker and Docker Compose
  • Node.js 16+ (for running the installer)

🏁 Quick Start

Installation

# Install WordPressify globally
npm install wordpressify -g

# Create a new project
mkdir my-wordpress-site
cd my-wordpress-site
wordpressify

Development

# Start the development environment
npm run start
# or
docker compose up

# Access your site at http://localhost:3010

Production

# Generate production-ready theme
npm run export
# or
docker compose run --rm nodejs npm run prod

# Your theme will be available in the /dist folder

Backup

# Create a backup of your WordPress installation
npm run export:backup
# or
docker compose run --rm nodejs npm run backup

# Backup will be saved in the /backups folder

📂 Project Structure

wordpressify/
├── build/                  # WordPress installation (generated)
├── config/                 # Configuration files
│   ├── nginx/              # Nginx configuration
│   └── php.ini             # PHP configuration
├── dist/                   # Production builds (generated)
├── src/                    # Source files
│   ├── assets/             # Theme assets
│   │   ├── css/            # CSS files
│   │   ├── fonts/          # Font files
│   │   ├── img/            # Image files
│   │   └── js/             # JavaScript files
│   ├── plugins/            # WordPress plugins
│   └── theme/              # WordPress theme
│       ├── functions.php   # Theme functions
│       ├── index.php       # Main template
│       ├── parts/          # Template parts
│       ├── patterns/       # Block patterns
│       └── templates/      # Block templates
├── docker-compose.yml      # Docker Compose configuration
├── Dockerfile-nodejs       # Node.js container configuration
├── Dockerfile-wordpress    # WordPress container configuration
└── gulpfile.js             # Gulp tasks

🛠️ Available Commands

Command Description
npm run start Start the development environment
npm run rebuild Rebuild the Docker containers
npm run export Generate production-ready theme
npm run export:backup Create a backup of your WordPress installation
npm run lintcss Lint CSS files

🔄 Environment Variables

Variable Description Default
THEME_NAME Name of your WordPress theme wordpressify
PROXY_PORT Port for the development server 3010
USE_POLLING Enable file watcher polling false

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👏 Acknowledgements


Visit wordpressify.co for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published