---
title: "Deploy WordPress LMS"
description: "Sell and run online courses on your own WordPress"
category: "CMS"
url: https://railway.com/deploy/deploy-wordpress-online-course-site
---

# Deploy WordPress LMS

Sell and run online courses on your own WordPress

**[Deploy WordPress LMS on Railway](https://railway.com/template/deploy-wordpress-online-course-site)**

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

- **Creator:** onepush
- **Category:** CMS

## Template content

### Valkey

- **Image:** valkey/valkey:9.1.2-alpine@sha256:48332870af354a799964c0012ae1194a0bf2bf894eb508f945810596dc2d8d11
- **Start command:** `/bin/sh -c 'exec docker-entrypoint.sh valkey-server --requirepass "$VALKEY_PASSWORD" --maxmemory "${VALKEY_MAXMEMORY:-256mb}" --maxmemory-policy allkeys-lru --save "" --appendonly no'`

### MariaDB

- **Image:** mariadb:12.3.3@sha256:99c125f103f5d081ebbc9ffe064e63daf7f688ac33a5f7f29af2d7260a96debf
- **Start command:** `/bin/sh -c 'exec docker-entrypoint.sh mariadbd --innodb-buffer-pool-size="${MARIADB_INNODB_BUFFER_POOL_SIZE:-256M}" --max-allowed-packet=64M --skip-name-resolve'`

### WordPress

- **Image:** ghcr.io/onepush-dev/wordpress:7.1.3-php8.4@sha256:1cb7b95a5ce4ed01189fb44773773ea38ec5c5c56b0ca534f98435bda1725067
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted WordPress LMS (Self-Hosted Online Course Sites) on Railway

This template runs stock WordPress with the free LearnPress plugin, so you can build courses with lessons and quizzes and sell from your own domain.

## About Hosting WordPress LMS open-source software on Railway (self hosted LearnPress LMS on self-hosted WordPress template)

Your course content, student accounts, enrollment records, and quiz results live in your own WordPress database and on the WordPress volume, not on a rented course platform.

## Why Deploy WordPress LMS, the Teachable alternative on Railway (Railway Free Trial)

If you'd rather not pay Teachable a fee that grows with your student count, this stack gives you courses, lessons, quizzes, and enrollment on a site you own.

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

### Railway vs Other Hosting Providers and VPS for WordPress LMS self hosting

Railway gives you a WordPress, MariaDB and Valkey stack in one project, while other providers hand you a blank server.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Three linked services and a persistent volume at /var/www/html, with no server to patch. | A Droplet you size and secure yourself, so you own updates, backups and PHP tuning. |
| AWS | One project that deploys WordPress, MariaDB and Valkey together, with no VPC to wire up. | Broad services like EC2 and RDS that scale far past a small course site, with a steeper setup. |
| Hetzner | A managed deploy with environment variables and volumes preconfigured. | Low-cost servers with generous bandwidth, suited to someone happy to run LAMP and SSL renewals. |

## Common Use Cases for hosted WordPress LMS

- **Paid cohort course on a branded domain:** Build sections, lessons, and quizzes in the LearnPress course builder, then point your domain at the WordPress service and set WP_HOME to https://your-domain.
- **Moving a course catalog:** Export courses from an older site with LearnPress and import them into this one, then check each lesson and quiz after the move.
- **Free community course:** Turn on "Anyone can register" in Settings General and pick a New User Default Role so students can join without approval.
- **Lesson videos and PDFs:** Store media on the persistent volume at /var/www/html and raise PHP_UPLOAD_LIMIT above the 256M default for large files.
- **Quiz-based progress:** Use quizzes in each course to see where enrolled students get stuck, and confirm how progress is reported in your LearnPress version.

## Dependencies for WordPress LMS Docker hosted on Railway

This template runs three services on Railway: WordPress, MariaDB, and Valkey.

### Deployment Dependencies for Managed WordPress LMS Service (CMS)

- **WordPress:** image ghcr.io/onepush-dev/wordpress:7.1.3-php8.4, port 80, health check /healthz, volume at /var/www/html for core, themes, plugins, and uploads.
- **MariaDB:** version 12.3.3, volume at /var/lib/mysql, with MARIADB_AUTO_UPGRADE turned on.
- **Valkey:** version 9.1.2, password protected, 256mb maxmemory with LRU eviction, and no volume since it only acts as a cache.

### Implementation Details for WordPress LMS (Using WordPress official docker image)

The WordPress service reads WP_HOME, which you should set to your Railway domain over HTTPS and change to https://your-domain once you add a custom domain.

## How does WordPress LMS compare against other ways to build an online course site

### WordPress LMS vs Teachable (Teachable Alternative)

- **Ownership:** Your courses, students, and lesson files live on your own Railway site, so you can move them with LearnPress export and import instead of depending on one hosted platform.
- **Cost model:** You pay Railway for hosting and pick your own payment route, such as PayPal or WooCommerce, rather than paying a platform fee on every sale. Teachable wins here for simplicity, since its plans bundle checkout and hosting in one bill.
- **Setup effort:** Teachable gives you a finished course builder and storefront on day one. With WordPress LMS you install LearnPress, build the curriculum, and handle more of the theme and email setup yourself.

### WordPress LMS vs Thinkific (Thinkific Alternative)

- **Customization:** WordPress gives you themes, plugins, and direct access to the code, which Thinkific's hosted editor does not. Thinkific is easier if you never want to touch a plugin.
- **Uploads:** Lesson videos and PDFs land on the persistent volume at /var/www/html, and you control the upload limit through PHP_UPLOAD_LIMIT, which defaults to 256M. Large video libraries may still be better served by an external video host.

### WordPress LMS vs Kajabi (Kajabi Alternative)

- **Scope:** Kajabi bundles courses, memberships, email marketing, and funnels into one product. WordPress LMS covers courses, lessons, quizzes, and registration, and you add marketing tools as separate plugins.
- **Control:** Your site stays on your domain and your database, and you can export it. Kajabi wins if you want a single vendor handling marketing and support.

### WordPress LMS vs Moodle (Moodle Alternative)

- **Audience fit:** Moodle is built for institutions with grading, cohorts, and deep reporting, and it is widely used by universities. LearnPress suits creators and small teams selling courses to the public, not large academic deployments.
- **Maintenance:** Moodle needs more server know-how and a heavier install. WordPress LMS runs on a standard WordPress stack, which most people can manage, though you still own updates and backups.

## How to use WordPress LMS (the OSS content management system)?

Here's what to do on day one after the template finishes deploying. These steps assume the WordPress, MariaDB and Valkey services are all healthy.

1. Deploy the WordPress, MariaDB and Valkey template on Railway and set WP_HOME to your Railway domain over HTTPS:

```
WP_HOME=https://your-railway-domain
```

2. Open the public domain and finish the WordPress installer, choosing a site title and admin user.
3. In the WordPress dashboard, go to Plugin / Add new, search LearnPress, and activate it from the Plugins page.
4. Go to Settings General and set Anyone can register and New User Default Role as needed for your students.
5. Build a course curriculum with sections, lessons and quizzes in the LearnPress course builder, then publish it.
6. After adding a custom domain, change WP_HOME to https://your-domain so links and redirects point at the right place.
7. Check Tools / Site Health to confirm the object cache drop-in is active before you invite students.

## How to self host WordPress LMS on other VPS Services (WordPress self hosting guide)

Running this stack on your own VPS means you handle the three services Railway normally wires up for you.

### Clone the Repository

Pull the template source and move into the project folder.

```
git clone https://github.com/onepush-dev/wordpress.git
cd wordpress
```

### Install Dependencies

You need Docker and Docker Compose on the VPS.

```
sudo apt-get update
sudo apt-get install -y docker.io docker-compose-plugin
```

### Configure Environment Variables

Set the database, cache, and domain values before the first start. Use your-domain as a stand-in and keep WP_HOME on HTTPS.

```
WP_HOME=https://your-domain
WORDPRESS_DB_HOST=mariadb
WORDPRESS_DB_PASSWORD=change-me
WP_REDIS_HOST=valkey
WP_REDIS_PASSWORD=change-me
```

Generate the eight auth keys and salts yourself, since a bare VPS will not create them.

### Start the WordPress LMS Application

Bring up the stack, then open your domain and finish the WordPress installer.

```
docker compose up -d
```

Railway handles the build, networking, TLS certificates, and persistent volumes for you, which you have to maintain yourself on a VPS.

## Official Pricing of WordPress LMS (WordPress pricing)

WordPress itself is free and released under the GPLv2 license, and the LearnPress plugin that adds courses, lessons, and quizzes is free to install from wordpress.org.

## WordPress LMS cloud vs self hosted comparison (Pricing, features, costs, and more)

Running a course site on your own WordPress means you pay for the server and the time to keep it up, not a per-student platform fee.

### Monthly cost of self hosting WordPress LMS on Railway

Railway typically runs about $5-20 per month for a small to medium course site, depending on traffic and RAM.

### System Requirements for Hosting WordPress LMS on a VPS

A small site needs about 512 MB to 1 GB of RAM for WordPress plus MariaDB. On a VPS you will also run Valkey, capped at 256 MB.

## Frequently Asked Questions (FAQs)

### Do I need a paid add-on to sell courses?

LearnPress is free, and its docs say it takes payment through PayPal and WooCommerce.

### How do I export a course to another site?

LearnPress supports exporting and importing courses between sites.

### Does logged-in traffic bypass the page cache?

The template doesn't install a full-page cache plugin, so there's nothing to bypass by default.

### How do I raise the lesson upload size limit?

Set PHP_UPLOAD_LIMIT on the WordPress service. It defaults to 256M, so raise it if your lesson videos or PDFs are larger.

### Which email settings control student notifications?

Settings General controls the Administration Email Address, which handles site notifications like new registrations.

### Where are uploaded lesson files stored?

Uploads live on the persistent volume mounted at /var/www/html, which keeps them across redeploys.


## 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/deploy-wordpress-online-course-site
