
Deploy Deploy WordPress Self Hosted Blog
Self-hosted WordPress.org blog instead of WordPress.com
Just deployed
MariaDB
Just deployed
/var/lib/mysql
WordPress
Just deployed
/var/www/html
Deploy and Host self hosted WordPress Blog (Self-Hosted WordPress.org Blog) on Railway
This template runs WordPress.org, the free software, on Railway with MariaDB, Valkey object caching and a persistent volume. No WordPress.com plugin limits. It is for writers and small publications who want their own blog.
About Hosting WordPress Blog open-source software on Railway (self hosted a self-hosted WordPress blog template)
Your posts, media and database live in your own Railway project rather than in an Automattic account, so no plan change can take a plugin away from you.
The template runs WordPress 7.1.3 on PHP 8.4 with MariaDB 12.3.3, a Valkey object cache and your files on a persistent volume. Backups of the volume and database are still yours to run.
Why Deploy WordPress Blog, the WordPress.com alternative on Railway (Railway Free Trial)
WordPress.org is free software: you pay for the server, not a plan tier that gates plugins and themes. Railway runs about $5 to $20 a month for a small blog depending on traffic, and the $5 trial lets you test the whole setup before you commit.
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 Blog 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 Blog self hosting
Railway runs WordPress, MariaDB and Valkey for you; a VPS hands you the OS, TLS and backups.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Volumes and health checks wired; scale RAM per service | Droplet plus LAMP, MySQL and Redis by hand; snapshots billed extra |
| AWS | One click, about $5-20 a month for a small site, no IAM work | EC2, RDS and ElastiCache to assemble and pay for separately |
| Hetzner | Managed deploy and domain, no SSH patching | Cheap boxes, but you own the OS, backups and tuning |
Common Use Cases for hosted WordPress Blog
- A personal blog with any theme: install any block theme from the directory, swap templates in the Site Editor, and keep posts and media on your own volume.
- A small publication with several authors: use Administrator, Editor, Author and Contributor roles so writers submit drafts and editors publish, without one shared login.
- Moving off WordPress.com: export a WXR file at Tools > Export, then import it with the WordPress Importer; media is fetched from the old site as the import runs.
- A company blog on a custom domain: add the domain in Railway, then update the WordPress and Site Address so WP_HOME stops pointing at the Railway hostname.
- A newsletter-plus-blog setup: write in the block editor, install an SMTP plugin and send each post to subscribers through your mail provider.
Dependencies for WordPress Blog Docker hosted on Railway
Nothing is installed by hand. Three services arrive wired: WordPress on ghcr.io/onepush-dev/wordpress:7.1.3-php8.4 pinned by digest, MariaDB 12.3.3, and Valkey 9.1.2 as the object cache. All 32 variables come defaulted, so you open the domain and run the installer.
Deployment Dependencies for Managed WordPress Blog Service (Blogging Platform)
- MariaDB keeps data on a volume at /var/lib/mysql, with MARIADB_AUTO_UPGRADE on and a tuned InnoDB buffer pool.
- WordPress keeps core, plugins, themes and uploads at /var/www/html, listens on port 80 and answers /healthz.
- Valkey is password protected, capped at 256 MB with LRU eviction, and volume-less, which suits a cache.
- WORDPRESS_DB_HOST points at MariaDB; WP_REDIS_HOST, WP_REDIS_PORT and WP_REDIS_PASSWORD point at Valkey. WP_HOME is the Railway domain over HTTPS, with salts generated per deploy.
Implementation Details for WordPress Blog (Using WordPress official docker image)
Rolling your own means the official wordpress image on PHP 8.4 and Apache plus a MySQL container. GitHub Actions builds it from github.com/onepush-dev/wordpress under GPL-2.0 or later.
How does WordPress Blog compare against other ways to run a WordPress blog
Self-hosted WordPress vs WordPress.com (WordPress.com Alternative)
- Plugin and theme freedom: WordPress.org is free GPL software, so any plugin or theme installs. WordPress.com limits both by plan.
- Where WordPress.com wins: no maintenance at all. They run updates, backups, security and mail for you.
- Ownership: Your files, database and domain sit in your Railway project, and export is still a WXR file.
WordPress vs Ghost (Ghost Alternative)
- Publishing scope: WordPress does posts, pages, custom post types and any theme. Ghost stays leaner and more opinionated.
- Email: Ghost bundles newsletters and paid subscriptions. WordPress needs an SMTP plugin, plus a newsletter plugin.
- Where Ghost wins: far less to configure if newsletters and memberships are the whole business.
WordPress vs Substack (Substack Alternative)
- Revenue model: Substack takes a share of paid subscriptions. Self-hosted WordPress does not, though you pay Railway directly.
- Ownership: Your site, list and content stay yours. Substack keeps the platform and the reader relationship.
- Where Substack wins: zero setup and built-in discovery, and they send the email for you.
WordPress vs Medium (Medium Alternative)
- Control: Any theme, plugin or block layout on WordPress. Medium gives you an editor and a few formatting choices.
- Ownership: Medium hosts the site; you do not own the theme or the stack. WordPress hands you the files and database.
- Where Medium wins: an existing audience and no server to patch, back up or pay for.
How to use WordPress Blog (the OSS CMS)?
- Open your Railway domain and run the WordPress installer: site title, admin user, password.
- Set Settings > Permalinks to Post name.
- Pick a block theme in Appearance > Themes, then adjust templates in Appearance > Editor.
- Create categories, then write your first post in the block editor.
- Install an SMTP plugin and point it at Postmark, Mailgun, SES or your mail host, or resets and comment notifications never send.
- Add your custom domain in Railway, then set WP_HOME on the WordPress service to https://your-domain; the template defines it, so it overrides the Settings > General fields.
- Back up both halves, on a schedule:
mysqldump -h MARIADB_HOST -u USER -p DB_NAME > backup.sql
The volume holds uploads and plugins; the dump holds your posts. Test a restore once.
How to self host WordPress Blog on other VPS Services (WordPress self hosting guide)
Four steps on a fresh Ubuntu 24.04 box.
Clone the Repository
The official wordpress and mariadb images need no clone; the template's tuned image source lives at github.com/onepush-dev/wordpress if you want the same PHP settings.
mkdir wordpress
cd wordpress
Install Dependencies
Install Docker, Compose, and a database client so you can dump backups later.
sudo apt update
sudo apt install -y docker.io docker-compose-plugin mariadb-client
Configure Environment Variables
Write a compose file with both images and set the official variables:
WORDPRESS_DB_HOST=db
WORDPRESS_DB_USER=wp
WORDPRESS_DB_PASSWORD=change-me
WORDPRESS_DB_NAME=wp
Start the WordPress Blog Application
Bring the stack up, then open your-domain and run the installer. Back up the volume and the database with mysqldump.
docker compose up -d
Railway handles the image build, database wiring, object cache and TLS for the domain, so only the WordPress installer is left.
Official Pricing of WordPress Blog (WordPress pricing)
The WordPress.org software itself is free, released under GPLv2 or later, so there is no license fee and no per-seat charge. On Railway the trial starts at $5.
WordPress Blog cloud vs self hosted comparison (Pricing, features, costs, and more)
Monthly cost of self hosting WordPress Blog on Railway
On Railway a small to medium blog usually runs about $5-20 per month, depending on traffic and RAM. Your time is the real bill: updates, plugin checks and backups are yours.
System Requirements for Hosting WordPress Blog on a VPS
Any small VPS with 1 GB of RAM works for a low-traffic blog; 2 GB gives MariaDB and PHP more room. You need PHP 8.4, MySQL or MariaDB, and ideally Redis or Valkey for the object cache. Add disk for uploads, and plan backups for both the /var/www/html volume and the database.
Frequently Asked Questions (FAQs)
Is WordPress Blog free compared with WordPress.com?
The software is free: GPLv2, any plugin or theme. You pay only Railway compute, about $5-20/mo for a small site. WordPress.com gates plugins by plan.
Why do password resets and comment notifications never send?
There's no mail server here, and PHP mail goes nowhere. Install an SMTP plugin with Postmark, Mailgun, SES or your mail host so resets and notifications send.
How do I move a blog from WordPress.com to this template?
Export with Tools > Export on WordPress.com, then run Tools > Import > WordPress with the Importer plugin. Media loads from the old site during import.
Does WordPress generate a sitemap without a plugin?
Yes. Core has generated them at /wp-sitemap.xml since 5.5. Set permalinks to Post name first so the URLs read well.
How do I stop comment spam?
Settings > Discussion handles moderation; hold first comments for approval. Add Akismet or another anti-spam plugin too.
How do I back up the blog?
Two things: the volume at /var/www/html for uploads and themes, and the database via mysqldump. Test a restore once.
Template Content
MariaDB
mariadb:12.3.3