Deploy ClassicPress
Open Source Content Management System for Creators.
classicpress
Just deployed
/var/www/html
Just deployed
/var/lib/mysql
Deploy and Host ClassicPress on Railway
ClassicPress is a business-focused, community-led fork of WordPress without the Gutenberg block editor, offering a lightweight, fast, and highly stable Content Management System (CMS). This Railway template deploys ClassicPress (classicpress) paired with a MariaDB database (db), configured with persistent storage volumes and automated secret wiring.
About Hosting ClassicPress
Hosting ClassicPress on Railway deploys a two-tier container architecture:
- ClassicPress Web Application (
classicpress): Container service runningclassicpress/classicpress:php8.3-apacheon port80. It mounts a persistent volume at/var/www/htmlto safeguard uploaded media, plugins, themes, and configuration files across deployments. - MariaDB Database (
db): Relational database service usingmariadb:10.6. It mounts a persistent volume at/var/lib/mysqlto ensure database state (posts, pages, options, and user accounts) remains safe across redeployments, and offers public TCP proxy access on port3306.
Common Use Cases
- Lightweight CMS hosting: Run a high-performance blog, news publication, or business site built on ClassicPress.
- Block-editor-free publishing: Enjoy a traditional, streamlined classic editing interface without Gutenberg bloat.
- Custom PHP application hosting: Extend ClassicPress with classic WordPress-compatible plugins and custom themes.
- Self-hosted content platform: Maintain complete data ownership over media assets and database records on Railway infrastructure.
Dependencies for ClassicPress Hosting
- ClassicPress image:
classicpress/classicpress:php8.3-apache - MariaDB image:
mariadb:10.6 - Two persistent volumes:
/var/www/htmlon theclassicpressservice/var/lib/mysqlon thedbservice
- Railway public domain mapped to port
80forclassicpress - Auto-generated secret: MySQL password (
MYSQL_PASSWORD)
Upstream: ClassicPress Site · GitHub · Docker Hub
Implementation Details
| Service | Image | Role | Internal Port | Volume Mount |
|---|---|---|---|---|
| classicpress | classicpress/classicpress:php8.3-apache | PHP 8.3 + Apache Web Server & CMS | 80 | /var/www/html |
| db | mariadb:10.6 | MariaDB Database Server | 3306 | /var/lib/mysql |
Topology
| Service | Role | Volume | Public | Notes |
|---|---|---|---|---|
| classicpress | Apache Web Server + CMS Files | /var/www/html | Yes (Port 80) | Connects to db using ${{db.RAILWAY_PRIVATE_DOMAIN}} |
| db | MariaDB Database Engine | /var/lib/mysql | TCP Proxy (Port 3306) | Private networking with optional public TCP proxy access |
Volumes (drives) — what to mount
| Service | Mount path | What is stored |
|---|---|---|
| classicpress | /var/www/html | ClassicPress core PHP files, wp-content/ (themes, plugins, uploads), .htaccess, and configuration |
| db | /var/lib/mysql | MariaDB database tables, post contents, options, and user credentials |
Warning: Do not remove or detach the persistent volumes (
/var/www/htmlor/var/lib/mysql). Removing/var/www/htmlerases media uploads and custom plugins, while removing/var/lib/mysqlpermanently deletes your database state.
Quick Start
- Click the Deploy on Railway button above.
- Sign in (or create a free Railway account) and click Deploy.
- Wait 1–2 minutes for both the
dbdatabase andclassicpressweb application containers to provision. - Open the classicpress service → Settings → Networking and click the generated public domain URL.
- Complete the ClassicPress web setup wizard (Language, Site Title, Admin Username, Password, and Email).
Configuration
Application Variables (classicpress)
| Variable | Default / Source | Description / Notes |
|---|---|---|
WORDPRESS_DB_HOST | ${{db.RAILWAY_PRIVATE_DOMAIN}} | Internal MariaDB hostname provided by the db service |
WORDPRESS_DB_USER | wordpress | Database username created for ClassicPress |
WORDPRESS_DB_PASSWORD | ${{db.MYSQL_PASSWORD}} | Database access password referencing the auto-generated db secret |
WORDPRESS_DB_NAME | wordpress | Target MariaDB database name |
PORT | 80 | Web server port listened on inside the container |
Database Variables (db)
| Variable | Default / Source | Description / Notes |
|---|---|---|
MYSQL_DATABASE | wordpress | Default database created during MariaDB initialization |
MYSQL_USER | wordpress | Database user created during initialization |
MYSQL_PASSWORD | Auto-generated secret (16 chars) | Password for MYSQL_USER |
MYSQL_ROOT_PASSWORD | ${{MYSQL_PASSWORD}} | Administrative root database password |
MYSQLHOST | ${{RAILWAY_PRIVATE_DOMAIN}} | Internal private network domain |
MYSQLPORT | 3306 | MariaDB server port |
DATABASE_URL | mysql://${{MYSQL_USER}}:${{MYSQL_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}} | Private MySQL connection string |
DATABASE_PUBLIC_URL | Connection string via TCP Proxy | External connection URL for remote database clients (e.g., TablePlus, DBeaver) |
Custom Domain
- Open the classicpress service → Settings → Networking → Custom Domain.
- Add your custom domain and follow Railway’s DNS configuration instructions.
- Railway provisions TLS automatically.
- Log in to ClassicPress Admin (Settings → General) and update WordPress Address (URL) and Site Address (URL) to match your new custom domain URL (
https://yourdomain.com).
Updating ClassicPress
- Open the classicpress service → Settings → Source.
- Update the image tag (e.g.,
classicpress/classicpress:php8.3-apacheto a newer version tag). - Click Redeploy.
All uploaded media, installed themes/plugins, and database records will remain safe inside /var/www/html and /var/lib/mysql.
Traps
Common pitfalls and failure modes:
- Site URL Redirect Loops on Custom Domains — ClassicPress records site URLs in its database options. Changing Railway domains or configuring custom domains without updating site settings or defining
WP_HOMEandWP_SITEURLinwp-config.phpmay cause infinite HTTP redirect loops. - Volume Detachment Data Loss — Because both files (
/var/www/html) and database state (/var/lib/mysql) are stored on persistent volumes, removing either volume during maintenance will delete user uploads or database records. - HTTPS Proxy Headers — Railway routes web requests through HTTPS reverse proxies. If CSS/JS assets attempt to load over HTTP or trigger mixed-content warnings, ensure
HTTP_X_FORWARDED_PROTOheaders are processed correctly. - Database Connection Delay during First Boot — If
classicpressboots before MariaDB has finished initializing its database directory, initial connection attempts may time out. Wait fordbto become healthy and redeployclassicpress.
Why Deploy ClassicPress on Railway?
Railway provides a complete platform for running web applications and databases together without server maintenance. Hosting ClassicPress on Railway gives you private service networking, isolated volume mounts, auto-generated security credentials, automatic HTTPS encryption, and reliable scaling.
Template Content
classicpress
classicpress/classicpress:php8.3-apache