Agent skill
wp-docker
Docker-based WordPress development environment. Use when setting up new WordPress sites, managing Docker containers, or automating site deployment with WP-CLI.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/crazyswami/wp-docker
SKILL.md
WordPress Docker Environment Skill
Complete Docker Compose setup for WordPress development with WP-CLI automation.
Quick Start
# Navigate to project directory
cd /path/to/project
# Copy templates
cp ~/.claude/skills/wp-docker/templates/* .
# Start environment
docker-compose up -d
# Run setup script
./wp-setup.sh "http://localhost:8080" "Site Name" "admin" "password" "admin@example.com"
Docker Compose Stack
Services
| Service | Image | Purpose | Port |
|---|---|---|---|
db |
mariadb:10.11 | MySQL database | 3306 (internal) |
wordpress |
wordpress:php8.3-apache | WordPress + Apache | 8080 |
wpcli |
wordpress:cli | WP-CLI commands | - |
Volume Mounts
| Host Path | Container Path | Purpose |
|---|---|---|
./wp-content |
/var/www/html/wp-content |
Themes, plugins, uploads |
db_data |
/var/lib/mysql |
Database persistence |
./uploads.ini |
/usr/local/etc/php/conf.d/uploads.ini |
PHP config |
WP-CLI Commands
Site Installation
# Install WordPress
docker-compose run --rm wpcli core install \
--url="http://localhost:8080" \
--title="Site Name" \
--admin_user="admin" \
--admin_password="password" \
--admin_email="admin@example.com"
Plugin Management
# Install and activate plugins
docker-compose run --rm wpcli plugin install \
admin-site-enhancements \
branda-white-labeling \
admin-menu-editor \
yoast-seo \
litespeed-cache \
ewww-image-optimizer \
wp-mail-smtp \
instant-images \
--activate
# List installed plugins
docker-compose run --rm wpcli plugin list
# Update all plugins
docker-compose run --rm wpcli plugin update --all
Theme Management
# Install and activate theme
docker-compose run --rm wpcli theme install theme-name --activate
# List themes
docker-compose run --rm wpcli theme list
Content Creation
# Create page
docker-compose run --rm wpcli post create \
--post_type=page \
--post_title="About Us" \
--post_status=publish
# Create post
docker-compose run --rm wpcli post create \
--post_type=post \
--post_title="Hello World" \
--post_content="Welcome to our site." \
--post_status=publish
Options Management
# Update site options
docker-compose run --rm wpcli option update blogname "Site Name"
docker-compose run --rm wpcli option update blogdescription "Site tagline"
docker-compose run --rm wpcli option update permalink_structure '/%postname%/'
# Configure ASE
docker-compose run --rm wpcli option update admin_site_enhancements \
'{"change_login_url":{"enabled":true,"slug":"secure-login"}}' \
--format=json
Database Operations
# Export database
docker-compose run --rm wpcli db export backup.sql
# Import database
docker-compose run --rm wpcli db import backup.sql
# Search and replace (for migrations)
docker-compose run --rm wpcli search-replace "old-domain.com" "new-domain.com"
Environment Commands
Start/Stop
# Start containers
docker-compose up -d
# Stop containers
docker-compose down
# Stop and remove volumes (DESTRUCTIVE)
docker-compose down -v
# View logs
docker-compose logs -f wordpress
# Restart WordPress
docker-compose restart wordpress
Health Checks
# Check running containers
docker-compose ps
# Check WordPress version
docker-compose run --rm wpcli core version
# Check database connection
docker-compose run --rm wpcli db check
Common Workflows
New Site Setup
- Copy templates to project directory
- Start Docker environment
- Run wp-setup.sh script
- Configure white-labeling
- Create initial pages
- Run SEO setup
Site Migration
# Export from source
docker-compose run --rm wpcli db export backup.sql
# Copy wp-content folder
# Import to destination
docker-compose run --rm wpcli db import backup.sql
# Update URLs
docker-compose run --rm wpcli search-replace "old-url.com" "new-url.com"
# Flush cache
docker-compose run --rm wpcli cache flush
Plugin Audit
# List plugins with updates available
docker-compose run --rm wpcli plugin list --update=available
# Check for security issues
docker-compose run --rm wpcli plugin verify-checksums --all
Troubleshooting
Container Won't Start
# Check logs
docker-compose logs db
docker-compose logs wordpress
# Rebuild containers
docker-compose up -d --build
Database Connection Failed
# Wait for database to be ready
docker-compose exec db mysqladmin ping -h localhost -u root -p
# Check environment variables
docker-compose config
Permission Issues
# Fix wp-content permissions
docker-compose exec wordpress chown -R www-data:www-data /var/www/html/wp-content
WP-CLI Not Working
# Run with shell access
docker-compose run --rm --entrypoint /bin/sh wpcli
# Check WordPress installation
docker-compose run --rm wpcli core is-installed
PHP Configuration
uploads.ini
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
memory_limit = 256M
Related Skills
- white-label: Configure ASE + Branda for admin branding
- wordpress-admin: REST API and content management
- wp-performance: LiteSpeed Cache and optimization
- seo-optimizer: Yoast SEO configuration
Templates Location
All templates are in: ~/.claude/skills/wp-docker/templates/
docker-compose.yml- Full stack configurationwp-setup.sh- Automated site setup scriptuploads.ini- PHP configuration.env.example- Environment variables template
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?