2 years ago
Description: Zero Config | One click | WordPress | Docker | MySQL
Category: Blogs
11 Replies
a year ago
Hello @yav-ai 🙂
After many new deployments of the template, it seems that the WORDPRESS_DB_HOST variable is no longer correct and the template has become . As soon as the template is deployed for the first time, we get the following error on WordPress: Error establishing a database connection
The correct variable would be : ${{MySQL.RAILWAY_PRIVATE_DOMAIN}}
You should only enter the private IP of the MySQL container. Could you please investigate and deploy a fix?
Thank you.
btnalexandre
Hello @yav-ai 🙂 After many new deployments of the template, it seems that the WORDPRESS\_DB\_HOST variable is no longer correct and the template has become . As soon as the template is deployed for the first time, we get the following error on WordPress: Error establishing a database connection The correct variable would be : ${{MySQL.RAILWAY\_PRIVATE\_DOMAIN}} You should only enter the private IP of the MySQL container. Could you please investigate and deploy a fix? Thank you.
a year ago
Hi @btnalexandre,
Thanks for reporting this - We just tried deploying the template but could not replicate database connection error. Once the template was deployed, the first visit loads the language selection page successfully. We will pass this on to another developer on the team to verify the same again and will back to you if there are any changes or fixes that need to be made on the template.
Cheers,
YAV.AI
yav-ai
Hi @**btnalexandre,** Thanks for reporting this - We just tried deploying the template but could not replicate database connection error. Once the template was deployed, the first visit loads the language selection page successfully. We will pass this on to another developer on the team to verify the same again and will back to you if there are any changes or fixes that need to be made on the template. Cheers, YAV.AI
a year ago
Thanks for your quick reply 🙂 !
For more context: this seems to happen when I have two environments (e.g. production, staging) with the template deployed. Templates are deployed on Amsterdam eu-west-4
a year ago
Hi @btnalexandre,
We tested this again by creating a fresh deployment as "Production" and then adding a new "Staging" environment but could not replicate the error. For additional context we tested this on US West (Oregon, USA) zone.
If you can give us the exact steps to replicate this error - Happy to look into it and implement a fix to the template.
Here are the links for your ref: ( PS: We will delete these after 24 hours of posting this reply )
Prod: https://docker-image-production-94ce.up.railway.app/
Stg: https://docker-image-staging-94ce.up.railway.app/
Cheers,
YAV.AI
yav-ai
Hi @**btnalexandre,** We tested this again by creating a fresh deployment as "Production" and then adding a new "Staging" environment but could not replicate the error. For additional context we tested this on US West (Oregon, USA) zone. If you can give us the exact steps to replicate this error - Happy to look into it and implement a fix to the template. Here are the links for your ref: ( PS: We will delete these after 24 hours of posting this reply ) Prod: <https://docker-image-production-94ce.up.railway.app/> Stg: <https://docker-image-staging-94ce.up.railway.app/> Cheers, YAV.AI
a year ago
Hello,
Thanks for your quick reply. Indeed, it seems to work for you. Could you test 2 Wordpress + MYSQL instances in the same environment?
I think the best way to reproduce this bug is to test in the Amsterdam region.
Keep me updated.
Thanks a lot.
a year ago
Hi @btnalexandre,
Unfortunately, we don't have access to the Amsterdam region and hence unable to test it specifically on that region. We will have another look to try and create 2 seperate projects of each and see if there are any issues there. Alternatively, will also try to split the db connection into seperate env vars as an enhancement to the template.
Will keep you posted with the findings 👍 If you feel that this is a region specific error maybe Railway support needs to be made aware of this.
Cheers,
YAV.AI
a year ago
Okay thanks let me know when you have a workaround
3 months ago
Just crashes for me immediately. Any ideas?
2026-03-17T10:59:34.428827122Z [err] WordPress not found in /var/www/html - copying now...
2026-03-17T10:59:34.428831533Z [err] WARNING: /var/www/html is not empty! (copying anyhow)
2026-03-17T10:59:34.589921596Z [err] Complete! WordPress has been successfully copied to /var/www/html
2026-03-17T10:59:34.589927954Z [err] No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_AUTH_KEY WORDPRESS_AUTH_SALT WORDPRESS_CONFIG_EXTRA WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER WORDPRESS_LOGGED_IN_KEY WORDPRESS_LOGGED_IN_SALT WORDPRESS_NONCE_KEY WORDPRESS_NONCE_SALT WORDPRESS_SECURE_AUTH_KEY WORDPRESS_SECURE_AUTH_SALT)
2026-03-17T10:59:34.752648118Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:34.753058383Z [inf] Starting Container
2026-03-17T10:59:34.786430802Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:37.563591280Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:37.831712345Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:38.785749914Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:38.866587497Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:39.812327709Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:40.003648729Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:41.603880550Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:41.938182513Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:47.087937445Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:47.410287444Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:48.836502672Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:49.109413321Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:50.073979962Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.
2026-03-17T10:59:50.120226800Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:51.146637767Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb
2026-03-17T10:59:51.304242322Z [err] AH00534: apache2: Configuration error: More than one MPM loaded.kieron
Just crashes for me immediately. Any ideas? ``` 2026-03-17T10:59:34.428827122Z [err] WordPress not found in /var/www/html - copying now... 2026-03-17T10:59:34.428831533Z [err] WARNING: /var/www/html is not empty! (copying anyhow) 2026-03-17T10:59:34.589921596Z [err] Complete! WordPress has been successfully copied to /var/www/html 2026-03-17T10:59:34.589927954Z [err] No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_AUTH_KEY WORDPRESS_AUTH_SALT WORDPRESS_CONFIG_EXTRA WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER WORDPRESS_LOGGED_IN_KEY WORDPRESS_LOGGED_IN_SALT WORDPRESS_NONCE_KEY WORDPRESS_NONCE_SALT WORDPRESS_SECURE_AUTH_KEY WORDPRESS_SECURE_AUTH_SALT) 2026-03-17T10:59:34.752648118Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:34.753058383Z [inf] Starting Container 2026-03-17T10:59:34.786430802Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.563591280Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.831712345Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.785749914Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.866587497Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:39.812327709Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:40.003648729Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.603880550Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.938182513Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.087937445Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.410287444Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:48.836502672Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:49.109413321Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:50.073979962Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:50.120226800Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.146637767Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.304242322Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. ```
3 months ago
Hi kieron,
Thank you for reporting this! We are looking into this and will reply back ASAP.
Cheers,
Yav
kieron
Just crashes for me immediately. Any ideas? ``` 2026-03-17T10:59:34.428827122Z [err] WordPress not found in /var/www/html - copying now... 2026-03-17T10:59:34.428831533Z [err] WARNING: /var/www/html is not empty! (copying anyhow) 2026-03-17T10:59:34.589921596Z [err] Complete! WordPress has been successfully copied to /var/www/html 2026-03-17T10:59:34.589927954Z [err] No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_AUTH_KEY WORDPRESS_AUTH_SALT WORDPRESS_CONFIG_EXTRA WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER WORDPRESS_LOGGED_IN_KEY WORDPRESS_LOGGED_IN_SALT WORDPRESS_NONCE_KEY WORDPRESS_NONCE_SALT WORDPRESS_SECURE_AUTH_KEY WORDPRESS_SECURE_AUTH_SALT) 2026-03-17T10:59:34.752648118Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:34.753058383Z [inf] Starting Container 2026-03-17T10:59:34.786430802Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.563591280Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.831712345Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.785749914Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.866587497Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:39.812327709Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:40.003648729Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.603880550Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.938182513Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.087937445Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.410287444Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:48.836502672Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:49.109413321Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:50.073979962Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:50.120226800Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.146637767Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.304242322Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. ```
3 months ago
Here is a fix (we will update the template shortly)
Add this to your start command:
bash -c "grep -q 'ServerName localhost' /etc/apache2/apache2.conf || echo 'ServerName localhost' >> /etc/apache2/apache2.conf; a2dismod mpm_event || true; a2dismod mpm_worker || true; a2enmod mpm_prefork; exec docker-entrypoint.sh apache2-foreground"We have confirmed this using a fresh install with the custom start command and there are no more crashes on start.
Why is this needed?
The newer WordPress docker image uses Apache/2.4.66 (Debian) PHP/8.3.30
Debian Bookworm + newer Apache builds:
- may ship with mpm_event enabled by default
- while WordPress still expects mpm_prefork (mod_php)
- mpm_event + mpm_prefork both loaded → crash
kieron
Just crashes for me immediately. Any ideas? ``` 2026-03-17T10:59:34.428827122Z [err] WordPress not found in /var/www/html - copying now... 2026-03-17T10:59:34.428831533Z [err] WARNING: /var/www/html is not empty! (copying anyhow) 2026-03-17T10:59:34.589921596Z [err] Complete! WordPress has been successfully copied to /var/www/html 2026-03-17T10:59:34.589927954Z [err] No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_AUTH_KEY WORDPRESS_AUTH_SALT WORDPRESS_CONFIG_EXTRA WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER WORDPRESS_LOGGED_IN_KEY WORDPRESS_LOGGED_IN_SALT WORDPRESS_NONCE_KEY WORDPRESS_NONCE_SALT WORDPRESS_SECURE_AUTH_KEY WORDPRESS_SECURE_AUTH_SALT) 2026-03-17T10:59:34.752648118Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:34.753058383Z [inf] Starting Container 2026-03-17T10:59:34.786430802Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.563591280Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:37.831712345Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.785749914Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:38.866587497Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:39.812327709Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:40.003648729Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.603880550Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:41.938182513Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.087937445Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:47.410287444Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:48.836502672Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:49.109413321Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:50.073979962Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. 2026-03-17T10:59:50.120226800Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.146637767Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/bf6ab18a-815a-4258-8d68-fe64403a8a7d/vol_efvldwj1loi3qusb 2026-03-17T10:59:51.304242322Z [err] AH00534: apache2: Configuration error: More than one MPM loaded. ```
3 months ago
Hi kieron,
We have updated the template and fixed this issue. Once again, thank you for reporting this!
Cheers,
Yav
