STATUS ÜBERPRÜFEN
I AM LISTENING TO
|

Day 28: FrankenWP – FrankePHP + WordPress – 7 Days of Docker

22. April 2025
.SHARE

Inhaltsverzeichnis

FrankenWP is a specialized WordPress Docker image built on FrankenPHP, which is a PHP application server built on top of the Caddy web server. This combination offers several advantages:

  • Single Docker image for WordPress that includes built-in distributed server caching
  • Uses Souin & Caddy server for performance comparable to PHP-FPM + fastcgi
  • Simplified deployment with a single container instead of separate web server and PHP containers
  • Ability to mount server cache on multiple autoscaled servers

This guide will walk you through setting up FrankenWP on your own server using Docker Compose, including all necessary configuration options and client connection details.

Also see my article about FrankenPHP and using it under WSL2 on Windows as a development environment.

Prerequisites

Setting Up the Docker Compose Environment

1. Create a Project Directory

First, create a directory for your FrankenWP project:

2. Create the Docker Compose File

Create a compose.yaml file in your project directory:

This Docker Compose file sets up three services:

  • wordpress: The FrankenWP container running WordPress on FrankenPHP
  • db: A MariaDB database container
  • phpmyadmin: A phpMyAdmin container for database management

3. Create the Environment File

Create a .env file in your project directory to customize the environment variables:

4. Create the wp-content Directory

Create a wp-content directory in your project folder:

This directory will be mounted into the WordPress container and will store themes, plugins, and uploads.

Configuration Options

Environment Variables

The FrankenWP Docker Compose setup uses several environment variables that can be customized in your .env file:

Variable
Description
Default Value
SERVER_NAME
Caddy server name
:80
WP_DEBUG
Enable WordPress debug mode
true
WORDPRESS_DB_HOST
Database host
db
WORDPRESS_DB_USER
Database user
exampleuser
WORDPRESS_DB_PASSWORD
Database password
examplepass
WORDPRESS_DB_NAME
Database name
exampledb
WORDPRESS_TABLE_PREFIX
WordPress table prefix
wp_
DB_ROOT_PASSWORD
MySQL root password
examplepass
LOCAL_DB_PORT
Local port for MySQL
3309
LOCAL_PHPMYADMIN_PORT
Local port for phpMyAdmin
8096
CACHE_AGE
Cache age in seconds
8000
STATIC_CACHE_AGE
Static cache age in seconds
8000

Caddy Server Configuration

The FrankenWP image uses Caddy server, which is configured through the CADDY_GLOBAL_OPTIONS environment variable in the Docker Compose file. This variable allows you to set various Caddy options:

Common Caddy options include:

  • email: Email address for Let’s Encrypt certificate
  • auto_https: HTTPS configuration (disable_redirects turns off HTTP to HTTPS redirects)
  • debug: Enable debug mode
  • frankenphp: FrankenPHP configuration options

For production use, you should enable HTTPS by updating the CADDY_GLOBAL_OPTIONS and uncommenting the HTTPS port mapping in the Docker Compose file.

WordPress Configuration

Additional WordPress configuration can be added using the WORDPRESS_CONFIG_EXTRA environment variable:

Running the FrankenWP Server

1. Start the Containers

From your project directory, run:

This will start all three containers in detached mode.

2. Check the Status

Verify that all containers are running properly:

3. Access WordPress

Once the containers are running, you can access WordPress at:

  • WordPress: http://your-server-ip:8094
  • phpMyAdmin: http://your-server-ip:8096

4. Complete the WordPress Setup

Visit http://your-server-ip:8094 in your browser to complete the WordPress installation process.

Connecting to the Server

1. Browser Connection

To connect to your FrankenWP server, simply point your web browser to:

  • http://your-server-ip:8094 (or whichever port you configured)

2. WordPress Admin

Once WordPress is set up, you can access the admin panel at:

  • http://your-server-ip:8094/wp-admin

3. Domain Configuration

For production use, you’ll want to use a domain name instead of an IP address. Update your DNS settings to point your domain to your server’s IP address.

Then, update the Docker Compose file to use your domain:

And uncomment the HTTPS port mappings:

Update the Caddy configuration to enable automatic HTTPS:

Advanced Configuration

Customizing FrankenPHP Settings

FrankenPHP settings can be customized in the Caddy configuration. For example, to adjust PHP worker threads:

Custom Caddyfile

For more complex Caddy configurations, you can mount a custom Caddyfile into the container:

SSL/TLS Configuration

Caddy automatically handles SSL/TLS certificates using Let’s Encrypt when you configure a domain name. In production, enable HTTPS by updating your Docker Compose file:

References

Let’s Talk!

Suchen Sie einen zuverlässigen Partner, der Ihr Projekt auf die nächste Stufe bringt? Ob es sich um Entwicklung, Design, Sicherheit oder laufenden Support handelt – ich würde mich gerne mit Ihnen unterhalten und herausfinden, wie ich Ihnen helfen kann.

Nehmen Sie Kontakt auf,
und lassen Sie uns gemeinsam etwas Erstaunliches schaffen!

RELATED POSTS

Ever hear web designers obsess about „above the fold“ content? This term isn’t just designer jargon—it’s a fundamental concept that can make or break your website’s effectiveness. Let’s dive into what it means, why it matters, and how it works differently across the devices we use every day. What Exactly Is „Above the Fold“? The […]

Look, these days a solid VPN isn’t just nice to have—it’s practically essential. Whether you want to keep your browsing habits private, access that show that’s somehow available everywhere except your country, or just avoid getting hacked on sketchy coffee shop Wi-Fi, picking the right VPN makes all the difference. We’ve spent hours testing and […]

Need your Raspberry Pi to only update its display when content actually changes? Tired of constant refreshes wasting bandwidth and causing annoying flickers? I’ve got you covered! This guide walks through three practical solutions – from simple HTTP caching to real-time WebSockets – that will make your Pi display work smarter, not harder. Let’s dive […]

Alexander

Ich bin ein Full-Stack-Entwickler. Meine Fachkenntnisse umfassen:

  • Server-, Netzwerk- und Hosting-Umgebungen
  • Datenmodellierung / Import / Export
  • Geschäftslogik
  • API-Schicht / Aktionsschicht / MVC
  • Benutzeroberflächen
  • Benutzererfahrung
  • Verstehen, was der Kunde und das Unternehmen brauchen

Ich habe eine große Leidenschaft für das Programmieren, das Design und die Serverarchitektur – jeder dieser Bereiche beflügelt meine Kreativität, und ich würde mich ohne sie nicht vollständig fühlen.

Mit einem breiten Spektrum an Interessen erforsche ich ständig neue Technologien und erweitere mein Wissen, wo immer es nötig ist. Die Welt der Technik entwickelt sich rasant, und ich liebe es, mit den neuesten Innovationen Schritt zu halten.

Jenseits der Technologie schätze ich den Frieden und umgebe mich mit Gleichgesinnten.

Ich glaube fest an das Prinzip: Helfen Sie anderen, und die Hilfe wird zu Ihnen zurückkommen, wenn Sie sie brauchen.