---
title: "Deploy WordPress with Redis"
description: "Deploy WordPress with MariaDB and Redis "
category: "CMS"
url: https://railway.com/deploy/wordpress-with-redis
---

# Deploy WordPress with Redis

Deploy WordPress with MariaDB and Redis 

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

- **Creator:** Noor Adn's Projects
- **Category:** CMS
- **Total deploys:** 38

## Template content

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** bitnami/redis:7.2.5

### WordPress https://img.icons8.com/color/48/000000/wordpress.png

- **Image:** wordpress
- **Start command:** `/bin/bash -c "echo 'ServerName 0.0.0.0' >> /etc/apache2/apache2.conf && echo 'DirectoryIndex index.php index.html' >> /etc/apache2/apache2.conf && echo 'upload_max_filesize = 50M' >> /usr/local/etc/php/php.ini && echo 'post_max_size = 50M' >> /usr/local/etc/php/php.ini && docker-entrypoint.sh apache2-foreground"`
- **Public domain:** Yes

### MariaDB https://img.icons8.com/color/48/maria-db.png

- **Image:** mariadb

## Documentation

# Deploy and Host WordPress with Redis on Railway

**What is WordPress with Redis?**  
WordPress with Redis is a WordPress installation that uses Redis as an in-memory caching layer to store frequently accessed data. By integrating Redis with WordPress, you reduce database load, improve response times, and deliver a faster, more scalable site — especially under heavy traffic.

## About Hosting WordPress with Redis

Hosting WordPress with Redis means combining a content management system (CMS) and a high-performance key-value store into one optimized stack. WordPress manages your website content, while Redis caches objects, queries, and sessions in memory.  
On Railway, you can deploy both services in the same project and connect them through Railway’s internal networking. This eliminates complex network configurations and keeps latency low. The Redis Object Cache plugin for WordPress can then be configured using the `WORDPRESS_CONFIG_EXTRA` environment variable, removing the need to edit `wp-config.php` manually. With this setup, performance gains are immediate, and scaling is straightforward.

## Common Use Cases

- Speeding up dynamic WordPress sites by reducing database queries  
- Handling high traffic during product launches, events, or promotions  
- Running multiple WordPress instances (multi-tenant architecture) with a shared Redis cache and database

## Dependencies for WordPress with Redis Hosting

- **WordPress Docker image** (e.g., `wordpress:php8.2-apache`)  
- **Redis Docker image** (e.g., `redis:7-alpine`)  

### Deployment Dependencies

- [Redis Object Cache Plugin](https://wordpress.org/plugins/redis-cache/)  
- Railway account: [https://railway.app](https://railway.app)  

### Implementation Details

Example `WORDPRESS_CONFIG_EXTRA` for connecting to Redis via Railway’s internal host:

```php
define('DOMAIN_CURRENT_SITE', '${{RAILWAY_PUBLIC_DOMAIN}}');
define('WP_HOME', 'https://${{RAILWAY_PUBLIC_DOMAIN}}');
define('WP_SITEURL', 'https://${{RAILWAY_PUBLIC_DOMAIN}}');

define('WP_REDIS_HOST', '${{Redis.RAILWAY_PRIVATE_DOMAIN}}');
define('WP_REDIS_PORT', 6379);
define('WP_REDIS_PASSWORD', '${{Redis.REDIS_PASSWORD}}');
define('WP_REDIS_SCHEME', 'tcp');
```

## Why Deploy WordPress with Redis 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 with Redis 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) — Document management with OCR on Railway with PostgreSQL and Redis
- [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-with-redis
