---
title: "Deploy WordPress"
description: "WordPress 7.1 with MySQL, installed on first boot, wp-content on a volume"
category: "CMS"
url: https://railway.com/deploy/wordpress-5
---

# Deploy WordPress

WordPress 7.1 with MySQL, installed on first boot, wp-content on a volume

**[Deploy WordPress on Railway](https://railway.com/template/wordpress-5)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/wordpress-5/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** CMS

## Template content

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:8
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

### WordPress https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/wordpress.png

- **Source:** https://github.com/aalfath/wordpress-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host WordPress on Railway

WordPress is the open-source content management system behind a large share of the web. It runs blogs, company sites, portfolios and online shops, with thousands of themes and plugins. You write and manage everything from a browser-based dashboard, and your content stays in your own MySQL database.

## About Hosting WordPress

Hosting WordPress means running PHP with a web server, a MySQL database, and persistent storage for themes, plugins and uploads. This template deploys WordPress 7.1.4 from the official Apache image (pinned by digest) with Railway's MySQL, and keeps `wp-content` on a volume. On first boot it installs WordPress with WP-CLI, so the public install wizard is never exposed: you only enter an admin email, and the admin password is generated. Railway handles HTTPS, and WordPress already trusts Railway's proxy, so there are no redirect loops. PHP uploads are raised to 128 MB. Plan for backups of the volume and database.

## Common Use Cases

* Blogs, news sites and personal websites
* Company and marketing sites with a page builder or block theme
* Online shops with WooCommerce, or membership sites with plugins

## Dependencies for WordPress Hosting

* MySQL database (Railway MySQL, included)
* A volume for `wp-content` (themes, plugins, uploads), included

### Deployment Dependencies

* [WordPress](https://wordpress.org/) and its [release notes](https://wordpress.org/news/category/releases/)
* [Official WordPress Docker image](https://hub.docker.com/_/wordpress)
* [WP-CLI](https://wp-cli.org/)
* [Template source and changelog](https://github.com/aalfath/wordpress-railway-template)

### Implementation Details

After deploy, open your Railway domain and log in at `/wp-admin` with `WP_ADMIN_USER` (default `admin`) and `WP_ADMIN_PASSWORD` from the WordPress service's variables.

* **Custom domain:** add it in Railway, then update *WordPress Address* and *Site Address* under Settings → General (for example `https://YOUR-DOMAIN`).
* **Email:** the container can't send mail by itself. Install an SMTP plugin such as WP Mail SMTP for password resets and notifications.
* **Updates:** WordPress core comes from the image, and only `wp-content` is on the volume. New WordPress versions arrive as template updates that you apply from your Railway project. Don't update core from Dashboard → Updates, because that change is lost on the next redeploy. Plugins and themes update from wp-admin as usual.
* **Optional variables:** `WORDPRESS_CONFIG_EXTRA` (extra PHP for `wp-config.php`), `PHP_UPLOAD_LIMIT`, `PHP_MEMORY_LIMIT`.

## 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.



## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/wordpress-5
