CHECKING STATUS
I AM LISTENING TO
|

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

22. April 2025
.SHARE

Table of Contents

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!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Or: How I Learned to Stop Worrying and Love the Underscore Remember when you could just tell your computer what to do, in plain English, and it would actually do it? No? Well, grab your DeLorean, because we’re going back to the future with _hyperscript (yes, that underscore is part of the name, and yes, […]

As Visual Studio Code continues to dominate the code editor landscape in 2025, developers working with remote servers face an important decision: which SFTP extension should they use? The marketplace offers numerous options, but not all extensions are created equal. Some have been abandoned by their maintainers, while others have evolved into robust, actively maintained […]

Hey there! So you wanna build a Chrome extension? Awesome! It’s way easier than you think. Seriously, you can have a basic one running in like 5 minutes. Let me walk you through everything you need to know. Just build a leads data extractor for myself and a client! Not my first Chrome Extension, but […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.