
Deploy WordPress (Node.js/Docker)
Node.js/Docker & Seamless Local Dev (custom plugins/themes/uploads)
WordPress Application
MySQL
Just deployed
/var/lib/mysql
WordPress
Just deployed
/var/www/html
WordPress on Railway
Easily deploy WordPress on Railway with seamless support for local development out of the box.
This templates does not crash on deployment due to the more than one MPM loaded error.
Focal point of this template compared to the others is the local development, so you can easily create/manage custom WordPress plugins, themes and uploads without relying on Railway's SSH to access the files.
The template is flexible and extendable so you can even use it in a monorepo or other project structures.
Common Use Cases
- You prefer self-hosting WordPress.
- You want to develop WordPress plugins and themes.
- You want to use WordPress as a headless CMS (API) for your frontend application.
- You have an existing WordPress installation and want to migrate/use it on Railway.
- You can't deploy the other WordPress templates due to crashes from the more than one MPM loaded error.
Deploy and Host
- Click the button to use the template.
- Follow the instructions (zero-config).
- Open the URL assigned by Railway in your browser (eg. https://your-app-name.up.railway.app).
- Enjoy!
Deployment Dependencies
- WordPress Docker image
- MySQL Docker image
- Node.js (optional - for local developyment)
About Hosting
This template creates the Apache server (WordPress) and MySQL database for you.
The domain for the WordPress application will be the provided public domain by Railway or your own domain.
Local Development
In case you want to develop WordPress locally.
- Manage plugins, themes and uploads locally in these directories:
./data/plugins./data/themes./data/uploads
- Will automatically sync local changes to WordPress.
- Add an existing WordPress installation in
./data/migrateto use it as the base installation. - Only
plugins,themesanduploadsare synced, the rest are ignored by default to avoid messing up the core files of WordPress.- Feel free to add more directories if you need them.
Dependencies for this template
Prerequisites for local development.
- Docker
- Node.js & npm (optional)
- Only required for running
yarn devwhich is easier to remember, but you can rundocker compose -f compose.yaml upinstead.
- Only required for running
Setup
Assuming you have already deployed the template on Railway:
- Clone the upstream repository or create a new one using it as a template.
- Publish the repository to GitHub.
- At Railway change the
Source Repoto your cloned repository to automatically redeploy the service from your own GitHub commits (optional). - Either run:
yarn installand thenyarn devto start the server.- or
docker compose -f compose.yaml up.
- Open http://localhost:8080 in your browser to access WordPress.
Troubleshooting
Report any issues or suggestions here.
- If you accidentally delete the directories
data/plugins,data/themes,data/uploadsordata/migrateyou can runyarn dirsto recreate them.
Why Deploy this template on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying WordPress (Node.js/Docker) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
License
- WordPress: GPL-2.0 (GNU General Public License v2.0).
- MySQL: GPL-2.0 (GNU General Public License v2.0).
Template Content
MySQL
mysql:9.4WordPress
deltabox-studio/wordpress-railway