Deploy Wordpress
WordPress (PHP 8.3 + Apache) and MariaDB 12.3 LTS with persistent volumes.
WordPress
Just deployed
/var/www/html
Just deployed
/var/lib/mysql
Deploy and Host WordPress with MariaDB on Railway
WordPress is an open-source content management system used to build blogs, business websites, and online stores. This template deploys WordPress (PHP 8.3 + Apache) together with a MariaDB 12.3 LTS database, each with its own persistent volume.
About Hosting WordPress
Hosting WordPress means running a PHP web server and a MySQL-compatible database, and keeping both the site files and the data safe across restarts and redeploys. This template runs both as separate Railway services connected over the private network. WordPress core, themes, plugins, and uploads are stored in a persistent volume, and the database lives in its own persistent volume.
Common Use Cases
- Personal blogs and company websites
- Content sites and documentation portals
- Small online stores (for example with WooCommerce)
- Staging and test sites for themes and plugins
Dependencies for WordPress Hosting
This template needs two services, both deployed from the same GitHub repository: WordPress (official wordpress:php8.3-apache image) and MariaDB (official mariadb:12.3.3 LTS image). Each service uses its own persistent volume, and no external accounts or API keys are required.
Deployment Dependencies
- WordPress: official Docker image
wordpress:php8.3-apache - MariaDB: official Docker image
mariadb:12.3.3(LTS) - WordPress documentation: https://wordpress.org/documentation/
- MariaDB documentation: https://mariadb.com/kb/en/
Implementation Details
- WordPress files persist at
/var/www/html, and database files persist at/var/lib/mysql. - Database passwords and WordPress security keys and salts are generated automatically for each deployment.
- The database is only reachable over Railway's private network, never from the public internet.
WORDPRESS_CONFIG_EXTRAmakes WordPress detect HTTPS correctly behind Railway's proxy.wp-config.phpis created once on first start, so later changes toWORDPRESS_*variables do not update it automatically.- Run a single replica of each service, since volumes cannot be shared between instances.
Why Deploy WordPress 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 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.
Template Content
WordPress
RevivalDigital/railway-wordpress