Managing multiple WordPress sites for clients is the bread and butter of many web agencies. Traditionally, this meant using hosting panels like Plesk with its WP Toolkit, but there’s a modern approach that gives you more control and costs nothing in licensing fees: Docker-based hosting with FlatRun.

This guide walks through setting up and managing 20+ client WordPress sites using Docker, from initial setup to ongoing maintenance.

The Traditional Approach vs. Docker

Traditional Hosting Panels

With Plesk or cPanel, you typically get:

  • Shared PHP environment
  • All sites on the same server resources
  • WP Toolkit or similar for one-click installs
  • Per-site or per-account licensing costs

This works, but you’re limited by the panel’s capabilities and paying ongoing fees.

Docker-Based Hosting

With Docker and FlatRun:

  • Each site runs in isolated containers
  • Dedicated resources per client
  • Portable configurations (standard docker-compose)
  • Zero licensing costs

Let’s set this up.

Prerequisites

You’ll need:

  • A Linux server (Ubuntu 22.04 recommended)
  • At least 4GB RAM for 10+ sites (8GB+ preferred)
  • SSH access with sudo privileges
  • Domain names pointed to your server

Step 1: Install FlatRun

See the download page and documentation for installation instructions and requirements.

Step 2: Understanding the Stack

Each WordPress site in FlatRun runs as a stack of containers:

  • WordPress container: PHP and WordPress files
  • Database container: MySQL or MariaDB
  • Optional: Redis: For object caching
  • Optional: Nginx: As a reverse proxy

FlatRun’s WordPress template sets this up automatically, but understanding the components helps when troubleshooting.

Step 3: Deploy Your First WordPress Site

  1. Open your FlatRun dashboard
  2. Click Create Deployment
  3. Select the WordPress template
  4. Configure:
    • Domain: client1.example.com
    • Database credentials: (auto-generated or custom)
    • WordPress admin: Set initial credentials
  5. Click Deploy

Within 30-60 seconds, you’ll have a running WordPress installation.

What Just Happened?

FlatRun created:

  • A docker-compose.yml file defining your stack
  • WordPress and MySQL containers
  • Persistent volumes for files and database
  • Nginx reverse proxy configuration for your domain

The compose file is a standard Docker file you can inspect, modify, or export.

Step 4: Scale to Multiple Sites

Repeat the deployment process for each client site. FlatRun manages the complexity:

  • Each site gets isolated containers
  • Domains are automatically routed
  • SSL certificates are provisioned via Let’s Encrypt
  • Resources are tracked per deployment

Resource Allocation

By default, containers share server resources. For critical clients or to prevent one site from affecting others, you can set resource limits in the deployment settings:

services:
  wordpress:
    deploy:
      resources:
        limits:
          cpus: '1.0'
          memory: 512M

This prevents any single site from monopolizing your server.

Step 5: Managing Client Databases

FlatRun includes a database manager. For each site, you can:

  • Create additional databases
  • Manage user permissions
  • Run SQL queries
  • Import/export data

Access it through the deployment details page → Database tab.

Importing Existing Databases

Migrating from another host? Export your SQL dump and import it:

  1. Open the deployment’s database manager
  2. Use the import feature, or
  3. Use the terminal: mysql -u root -p database_name < dump.sql

Step 6: File Management

Every deployment includes a file manager. You can:

  • Browse the WordPress directory structure
  • Edit wp-config.php or other files directly
  • Upload plugins/themes via the browser
  • Download files for backup

For bulk operations, SFTP into the container volume or use the built-in terminal.

Step 7: Setting Up Staging Environments

Client wants to test changes before going live? Create a staging site:

  1. Create a new deployment with a staging domain (staging.client.com)
  2. Copy the production database to staging
  3. Copy the WordPress files
  4. Update wp-config.php with staging URLs

Or use FlatRun’s clone feature (if available in your version) to duplicate a deployment instantly.

Syncing Production to Staging

When you need fresh production data on staging:

# Export production database
mysqldump -u user -p production_db > backup.sql

# Import to staging
mysql -u user -p staging_db < backup.sql

# Update URLs in WordPress
wp search-replace 'https://client.com' 'https://staging.client.com' --all-tables

Step 8: SSL Certificate Management

FlatRun automatically provisions Let’s Encrypt certificates. To enable SSL:

  1. Ensure DNS points to your server
  2. Enable SSL in deployment settings
  3. FlatRun handles the rest

Monitor certificate expiration from the dashboard. FlatRun tracks all certificates and alerts you before expiration.

Step 9: Monitoring and Logs

Resource Monitoring

The FlatRun dashboard shows:

  • CPU usage per deployment
  • Memory consumption
  • Disk space
  • Network traffic

Use this to identify resource-hungry sites or plan capacity.

Log Access

Real-time log streaming helps debug issues:

  • WordPress/PHP errors
  • Database errors
  • Nginx access logs

Filter, search, and download logs from the deployment details page.

Step 10: Backup Strategy

Docker makes backups straightforward:

Database Backups

# From FlatRun terminal or cron job
mysqldump -u root -p$DB_PASSWORD $DB_NAME > /backups/$(date +%Y%m%d).sql

File Backups

Container volumes are stored on your server’s filesystem. Back them up with your standard server backup solution (rsync, restic, etc.).

Full Stack Export

Export the entire deployment’s docker-compose.yml and volumes for complete portability.

Common Workflows

Adding a New Client Site

  1. Get domain and hosting requirements
  2. Deploy WordPress template
  3. Configure domain in FlatRun
  4. Update DNS with client
  5. Enable SSL once DNS propagates
  6. Hand off to client or begin development

Time: ~5 minutes

WordPress Updates

For individual sites:

  1. Create backup
  2. Update via WordPress admin or WP-CLI
  3. Test functionality

For bulk updates, consider scripting WP-CLI across containers.

Plugin/Theme Installation

Options:

  • WordPress admin dashboard (traditional)
  • FlatRun file manager (upload zip)
  • WP-CLI in container terminal
  • SFTP to container volume

Performance Optimization

Each container can be customized. Common optimizations:

PHP Configuration:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
max_execution_time = 300

Add Redis Caching: Add Redis container to stack and configure WordPress with a Redis plugin.

Nginx FastCGI Cache: Configure Nginx container for static file caching.

Cost Comparison

Let’s compare managing 20 WordPress sites:

Plesk with WP Toolkit

  • Plesk Web Pro: $44.95/month
  • WP Toolkit SE: Often included, or $5/month extra
  • Annual cost: ~$540-600

FlatRun

  • FlatRun: $0
  • Server (your cost either way)
  • Annual cost: $0

Over three years, that’s $1,600+ saved—enough for a better server or reinvested in your business.

Troubleshooting Common Issues

Site Not Loading

  1. Check container status in FlatRun dashboard
  2. Verify Nginx proxy configuration
  3. Check DNS resolution
  4. Review container logs for errors

Database Connection Errors

  1. Verify database container is running
  2. Check wp-config.php credentials
  3. Ensure database host is container name (e.g., “db” not “localhost”)
  4. Check database container logs

Slow Performance

  1. Check resource usage in dashboard
  2. Review PHP error logs for warnings
  3. Consider adding Redis caching
  4. Evaluate if server needs more resources

SSL Certificate Issues

  1. Verify DNS points to server
  2. Check if Let’s Encrypt rate limits apply
  3. Review certificate logs
  4. Try re-issuing certificate

Moving Forward

Once you’re comfortable with the basics:

  • Automate deployments using FlatRun’s API
  • Create custom templates for your standard WordPress stack
  • Integrate with your tools via REST API
  • Build staging pipelines for client approval workflows

Getting Started

Ready to try this approach?

  1. Download FlatRun - One command installation
  2. Deploy a test site - Get comfortable with the interface
  3. Migrate a low-traffic client - Start small
  4. Scale up - Move more sites as confidence builds

The Docker-based approach gives you more control, better isolation, and zero licensing costs. It’s how modern infrastructure works—and now it’s accessible for WordPress hosting too.


Questions about managing WordPress with Docker? Check our documentation or open an issue on GitHub.