docker.recipes

ProcessWire CMS

intermediate

Developer-friendly CMS with powerful API and flexible architecture.

Overview

ProcessWire is a modern, developer-focused content management system and framework built on PHP that emphasizes flexibility, clean code, and powerful API-driven development. Created by Ryan Cramer in 2010, ProcessWire stands out from traditional CMSs by offering a jQuery-like API for content manipulation, complete programmatic control over markup output, and a unique fields-and-templates architecture that lets developers define custom content structures without database modifications. Unlike WordPress or Drupal, ProcessWire gives developers full access to PHP and doesn't impose themes or coding restrictions, making it ideal for custom web applications that need CMS capabilities. This ProcessWire and MySQL 8.0 combination creates a robust foundation for content-driven applications that require both flexibility and performance. MySQL 8.0's JSON data type support complements ProcessWire's flexible field system, while the database's improved query performance and InnoDB storage engine handle ProcessWire's API-heavy operations efficiently. The stack leverages MySQL's full-text search capabilities for ProcessWire's built-in search functionality and benefits from the database's ACID compliance for content integrity during complex page operations. This configuration is perfect for web agencies building custom client sites, developers creating content-heavy applications, and organizations needing a CMS that can evolve with complex requirements. ProcessWire's learning curve rewards developers with unprecedented control over content structure and output, while MySQL's mature ecosystem ensures reliable data management and excellent hosting compatibility across various deployment environments.

Key Features

  • jQuery-like $pages API for intuitive content querying with selectors like $pages->find('template=blog-post, date>2024-01-01')
  • Fields and Templates architecture allowing custom content types without database schema changes
  • ProcessWire's built-in image manipulation and automatic resizing with API-driven asset management
  • MySQL 8.0's JSON field support for storing ProcessWire's flexible field configurations and metadata
  • Full programmatic control over HTML output with no enforced markup or CSS frameworks
  • ProcessWire's multi-language support with MySQL's UTF8MB4 character set for global content
  • Built-in user management and permissions system with role-based access control
  • MySQL's InnoDB storage engine providing ACID compliance for ProcessWire's page tree operations

Common Use Cases

  • 1Custom client websites for web agencies requiring unique designs and content structures
  • 2Corporate websites with complex content hierarchies and multiple content types
  • 3Portfolio and showcase sites for creative professionals needing full design control
  • 4Multi-language business websites leveraging ProcessWire's internationalization features
  • 5Content-heavy applications like documentation sites or knowledge bases with powerful search
  • 6Rapid prototyping of content-driven web applications with custom APIs
  • 7Migration target for sites outgrowing WordPress or needing more developer flexibility

Prerequisites

  • Docker and Docker Compose installed with at least 1GB RAM available for MySQL
  • Basic PHP knowledge and familiarity with object-oriented programming concepts
  • Understanding of web development fundamentals including HTML, CSS, and MySQL
  • Port 80 available on host system for ProcessWire web interface access
  • Environment variables configured for ROOT_PASSWORD and DB_PASSWORD
  • Familiarity with ProcessWire's fields and templates concept for content modeling

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 processwire:
3 image: processwire/processwire:latest
4 container_name: processwire
5 restart: unless-stopped
6 volumes:
7 - ./site:/var/www/html
8 ports:
9 - "80:80"
10 depends_on:
11 - mysql
12 networks:
13 - processwire-network
14
15 mysql:
16 image: mysql:8.0
17 container_name: processwire-mysql
18 environment:
19 MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
20 MYSQL_DATABASE: processwire
21 MYSQL_USER: processwire
22 MYSQL_PASSWORD: ${DB_PASSWORD}
23 volumes:
24 - mysql_data:/var/lib/mysql
25 networks:
26 - processwire-network
27
28volumes:
29 mysql_data:
30
31networks:
32 processwire-network:
33 driver: bridge

.env Template

.env
1DB_PASSWORD=changeme
2ROOT_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://processwire.com/docs/
  2. 2Access at http://localhost, admin at /processwire
  3. 3Run installer at /install.php first
  4. 4jQuery-like $pages API: $pages->find('template=blog-post')
  5. 5Fields + Templates system: define content structure
  6. 6Developer-focused: full PHP access, no magic

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

processwire
processwire:
  image: processwire/processwire:latest
  container_name: processwire
  restart: unless-stopped
  volumes:
    - ./site:/var/www/html
  ports:
    - "80:80"
  depends_on:
    - mysql
  networks:
    - processwire-network
mysql
mysql:
  image: mysql:8.0
  container_name: processwire-mysql
  environment:
    MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
    MYSQL_DATABASE: processwire
    MYSQL_USER: processwire
    MYSQL_PASSWORD: ${DB_PASSWORD}
  volumes:
    - mysql_data:/var/lib/mysql
  networks:
    - processwire-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 processwire:
5 image: processwire/processwire:latest
6 container_name: processwire
7 restart: unless-stopped
8 volumes:
9 - ./site:/var/www/html
10 ports:
11 - "80:80"
12 depends_on:
13 - mysql
14 networks:
15 - processwire-network
16
17 mysql:
18 image: mysql:8.0
19 container_name: processwire-mysql
20 environment:
21 MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD}
22 MYSQL_DATABASE: processwire
23 MYSQL_USER: processwire
24 MYSQL_PASSWORD: ${DB_PASSWORD}
25 volumes:
26 - mysql_data:/var/lib/mysql
27 networks:
28 - processwire-network
29
30volumes:
31 mysql_data:
32
33networks:
34 processwire-network:
35 driver: bridge
36EOF
37
38# 2. Create the .env file
39cat > .env << 'EOF'
40DB_PASSWORD=changeme
41ROOT_PASSWORD=changeme
42EOF
43
44# 3. Start the services
45docker compose up -d
46
47# 4. View logs
48docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/processwire/run | bash

Troubleshooting

  • ProcessWire installer not found at /install.php: Ensure the processwire container has fully started and check volume mount permissions for ./site directory
  • Database connection failed during installation: Verify mysql container is running and environment variables ROOT_PASSWORD and DB_PASSWORD are properly set in .env file
  • Permission denied errors on site files: Run 'chmod -R 755 ./site' and 'chown -R www-data:www-data ./site' on the host system
  • ProcessWire admin redirects to install: Check that installation completed successfully and install.php was removed from the site directory
  • MySQL 8.0 authentication plugin errors: Add 'default-authentication-plugin=mysql_native_password' to MySQL configuration if using older PHP versions
  • Out of memory errors during large image processing: Increase PHP memory_limit in ProcessWire configuration or add memory limits to docker-compose for processwire service

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

processwiremysql

Tags

#processwire#php#api#developer-friendly

Category

CMS & Blogging
Ad Space