Deploy ClassicPress

Open Source Content Management System for Creators.

Deploy ClassicPress

/var/www/html

Just deployed

/var/lib/mysql

Deploy on Railway

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 running classicpress/classicpress:php8.3-apache on port 80. It mounts a persistent volume at /var/www/html to safeguard uploaded media, plugins, themes, and configuration files across deployments.
  • MariaDB Database (db): Relational database service using mariadb:10.6. It mounts a persistent volume at /var/lib/mysql to ensure database state (posts, pages, options, and user accounts) remains safe across redeployments, and offers public TCP proxy access on port 3306.

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/html on the classicpress service
    • /var/lib/mysql on the db service
  • Railway public domain mapped to port 80 for classicpress
  • Auto-generated secret: MySQL password (MYSQL_PASSWORD)

Upstream: ClassicPress Site · GitHub · Docker Hub

Implementation Details
ServiceImageRoleInternal PortVolume Mount
classicpressclassicpress/classicpress:php8.3-apachePHP 8.3 + Apache Web Server & CMS80/var/www/html
dbmariadb:10.6MariaDB Database Server3306/var/lib/mysql

Topology
ServiceRoleVolumePublicNotes
classicpressApache Web Server + CMS Files/var/www/htmlYes (Port 80)Connects to db using ${{db.RAILWAY_PRIVATE_DOMAIN}}
dbMariaDB Database Engine/var/lib/mysqlTCP Proxy (Port 3306)Private networking with optional public TCP proxy access
Volumes (drives) — what to mount
ServiceMount pathWhat is stored
classicpress/var/www/htmlClassicPress core PHP files, wp-content/ (themes, plugins, uploads), .htaccess, and configuration
db/var/lib/mysqlMariaDB database tables, post contents, options, and user credentials

Warning: Do not remove or detach the persistent volumes (/var/www/html or /var/lib/mysql). Removing /var/www/html erases media uploads and custom plugins, while removing /var/lib/mysql permanently deletes your database state.


Quick Start
  1. Click the Deploy on Railway button above.
  2. Sign in (or create a free Railway account) and click Deploy.
  3. Wait 1–2 minutes for both the db database and classicpress web application containers to provision.
  4. Open the classicpress service → Settings → Networking and click the generated public domain URL.
  5. Complete the ClassicPress web setup wizard (Language, Site Title, Admin Username, Password, and Email).

Configuration
Application Variables (classicpress)
VariableDefault / SourceDescription / Notes
WORDPRESS_DB_HOST${{db.RAILWAY_PRIVATE_DOMAIN}}Internal MariaDB hostname provided by the db service
WORDPRESS_DB_USERwordpressDatabase username created for ClassicPress
WORDPRESS_DB_PASSWORD${{db.MYSQL_PASSWORD}}Database access password referencing the auto-generated db secret
WORDPRESS_DB_NAMEwordpressTarget MariaDB database name
PORT80Web server port listened on inside the container
Database Variables (db)
VariableDefault / SourceDescription / Notes
MYSQL_DATABASEwordpressDefault database created during MariaDB initialization
MYSQL_USERwordpressDatabase user created during initialization
MYSQL_PASSWORDAuto-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
MYSQLPORT3306MariaDB server port
DATABASE_URLmysql://${{MYSQL_USER}}:${{MYSQL_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}Private MySQL connection string
DATABASE_PUBLIC_URLConnection string via TCP ProxyExternal connection URL for remote database clients (e.g., TablePlus, DBeaver)
Custom Domain
  1. Open the classicpress service → Settings → Networking → Custom Domain.
  2. Add your custom domain and follow Railway’s DNS configuration instructions.
  3. Railway provisions TLS automatically.
  4. 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
  1. Open the classicpress service → Settings → Source.
  2. Update the image tag (e.g., classicpress/classicpress:php8.3-apache to a newer version tag).
  3. 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_HOME and WP_SITEURL in wp-config.php may 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_PROTO headers are processed correctly.
  • Database Connection Delay during First Boot — If classicpress boots before MariaDB has finished initializing its database directory, initial connection attempts may time out. Wait for db to become healthy and redeploy classicpress.

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

More templates in this category

View Template
Libredesk - Complete Setup
Complete self-hosted omnichannel customer support desk.

codestorm
2
View Template
Paperless-ngx
Paperless-ngx — document management with OCR and full-text search

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
167