---
title: "Deploy Wordpress"
description: "Deploy and run your own website in one click. Zero config, ready to go."
category: "CMS"
url: https://railway.com/deploy/wordpress-2
---

# Deploy Wordpress

Deploy and run your own website in one click. Zero config, ready to go.

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

- **Creator:** codestorm
- **Category:** CMS
- **Total deploys:** 22

## Template content

### Wordpress https://www.svgrepo.com/show/475696/wordpress-color.svg

- **Image:** wordpress
- **Start command:** `/bin/sh -c 'set -eu; a2dismod mpm_event mpm_worker || true; a2enmod mpm_prefork || true; if [ ! -f /var/www/html/wp-admin/install.php ]; then echo "WordPress core incomplete - repairing..."; rm -f /var/www/html/index.php /var/www/html/wp-includes/version.php; fi; cd /var/www/html; exec docker-entrypoint.sh "$@"' -- apache2-foreground`
- **Public domain:** Yes

### MariaDB https://www.svgrepo.com/show/354037/mariadb-icon.svg

- **Image:** mariadb

## Documentation

# Deploy and Host WordPress on Railway

WordPress is the world’s most popular open-source Content Management System (CMS), powering over 40% of the web. It allows anyone to build, manage, and scale websites—from simple blogs to complex e-commerce stores—using a powerful interface, thousands of customizable themes, and a massive ecosystem of plugins.

## About Hosting WordPress

Hosting WordPress on Railway eliminates the traditional headache of manual server configuration and LAMP/LEMP stack maintenance. This deployment utilizes a containerized WordPress image paired with a high-performance MariaDB database. By leveraging Railway's infrastructure, you get automatic SSL, private networking between your app and database, and ephemeral storage handling. The deployment is configured to be "stateless-ready," meaning your configuration is injected via environment variables, ensuring that your site remains consistent and secure through every redeploy or horizontal scaling event.

## Common Use Cases

* **Personal Blogs & Portfolios:** Quickly launch a professional space to share your thoughts or showcase your work.
* **Business Landing Pages:** Create high-converting business sites with SEO-friendly tools and custom themes.
* **E-commerce Stores:** Scale a robust online shop by integrating WooCommerce with the stability of Railway’s infrastructure.

## Dependencies for WordPress Hosting

* **MariaDB Service:** A dedicated database to store your posts, users, and site configuration.
* **Environment Variables:** Standardized keys (SALT/AUTH) to secure your WordPress installation and connect to the database.

### Deployment Dependencies

* [Official WordPress Documentation](https://wordpress.org/support/)
* [Railway MariaDB Reference](https://www.google.com/search?q=https://docs.railway.app/database/mariadb)
* [Docker Hub: WordPress Image](https://hub.docker.com/_/wordpress)

### Implementation Details

To ensure a seamless "One Click" experience, this template pre-configures the core security salts and database links. The following environment variables are automatically generated during deployment:

```env
# Automatic Database Linking
WORDPRESS_DB_HOST=${{MariaDB.MARIADB_PRIVATE_HOST}}
WORDPRESS_DB_PASSWORD=${{MariaDB.MARIADB_PASSWORD}}

# Automatic Security Salts
WORDPRESS_AUTH_KEY=${{secret(32)}}
WORDPRESS_SECURE_AUTH_KEY=${{secret(32)}}
WORDPRESS_LOGGED_IN_KEY=${{secret(32)}}
WORDPRESS_NONCE_KEY=${{secret(32)}}

```

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