
Deploy WordPress Migration
Move an existing WordPress site onto Railway
Just deployed
MariaDB
Just deployed
/var/lib/mysql
WordPress
Just deployed
/var/www/html
Deploy and Host self hosted WordPress Migration (Self-Hosted WordPress for Site Migrations) on Railway
This template runs WordPress 7.1.3 on PHP 8.4 with MariaDB and a Valkey object cache, ready to receive an existing site.
About Hosting WordPress Migration open-source software on Railway (self hosted WordPress site migration to Railway template)
This template gives you a WordPress site on Railway with three services: WordPress 7.1.3 on PHP 8.4 with OPcache, MariaDB 12.3.3 for the database, and Valkey 9.1.2 as the object cache.
Why Deploy WordPress Migration, the shared WordPress hosting alternative on Railway (Railway Free Trial)
Shared hosting is cheap to start, but you share CPU and memory with strangers and rarely get tuning or an object cache.
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 Migration 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 Migration self hosting
Railway runs the platform layer, but the site and its data stay yours.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | WordPress, MariaDB and Valkey as linked services with volumes and a public domain. | A Droplet you build yourself, with the web server, PHP, database and cache all patched by you. |
| AWS | One project with the stack pre-configured, so no VPC or security group setup before the import. | Full control over EC2, RDS and networking, which means designing and maintaining the whole layout. |
| Hetzner | Managed restarts and a separate volume for the database and uploads folder. | Low cost per gigabyte, with backups, updates and recovery all on you. |
Both approaches work for a migration, so pick the one that matches how much server time you want to spend.
Common Use Cases for hosted WordPress Migration
- Leaving slow shared hosting: You have a WordPress site on a cheap shared plan that crawls under load. You export it with a migration plugin, import it here, and test it on the Railway domain before you touch DNS.
- Consolidating client sites: An agency with a handful of small WordPress sites can move each one into its own Railway project, so one bad plugin on one client does not take down the rest.
- Moving off a VPS you no longer want to patch: You are tired of applying PHP and database updates yourself. You copy wp-content and dump the database, then let the managed image handle the runtime.
- Staging a copy of a live site: You want to test a redesign or a plugin update against real content. You migrate a copy to a separate Railway project, change the URL, and experiment there without affecting visitors.
- Moving a WooCommerce store in a quiet window: You pick a low-traffic hour, put the old site in maintenance mode, do a final database export, and import it here so orders and stock stay consistent.
Dependencies for WordPress Migration Docker hosted on Railway
This stack runs three services on Railway: WordPress, MariaDB, and Valkey.
Deployment Dependencies for Managed WordPress Migration Service (WordPress Hosting)
- MariaDB 12.3.3: Stores posts, options, and users, with credentials passed through the WORDPRESS_DB_* variables.
- Valkey 9.1.2: Backs the Redis Object Cache drop-in, password protected and capped at 256 MB, with no volume since losing cache is fine.
- Railway volumes: One for WordPress files and one for MariaDB data, so migrated content survives redeploys.
- Railway domain or custom domain: Needed for the installer and for testing before you switch DNS.
Implementation Details for WordPress Migration (Using WordPress official docker image)
PHP_UPLOAD_LIMIT (default 256M) and PHP_MEMORY_LIMIT (default 512M) matter when a migration package is large.
How does WordPress Migration compare against other ways to move a WordPress site
Railway WordPress vs shared hosting (Shared WordPress Hosting Alternative)
- Isolation: Railway gives this stack its own containers for WordPress, MariaDB and Valkey, so a neighbour's traffic spike won't slow your site the way it can on shared hosting.
- Control: You pick the PHP version, memory limits and object cache, and you can read the logs when something breaks.
- Where shared hosting wins: It is usually cheaper for a tiny brochure site, and the host handles backups and patching for you.
Railway WordPress vs managed WordPress hosts (WP Engine or Kinsta style)
- Cost model: Railway bills by resource use, which is usually easier to predict for a small site. Managed hosts price by plan tier, so check their current terms.
- Tuning: This stack ships with OPcache and a Valkey object cache. Managed hosts add page caching, CDN edges and staging, which you would add yourself here.
- Where managed hosts win: They offer support staff, automatic core updates and staging. If you want someone else on call, a managed host fits better.
Railway WordPress vs WordPress.com (Hosted WordPress by Automattic)
- Plugins: Self-hosted WordPress runs any plugin or theme, including migration plugins that WordPress.com's lower plans restrict.
- Data ownership: Your database and files sit on your own Railway services, and you can export them at any time.
- Where WordPress.com wins: It needs no server work at all. For a plain blog with no custom code, it is simpler.
Railway WordPress vs a self-managed VPS (DigitalOcean, Hetzner style)
- Setup time: A Railway deploy finishes the installer and wires in MariaDB and Valkey in one go. On a VPS you install the web server, PHP, the database and the cache yourself.
- Patching: Railway rebuilds the WordPress image from pinned upstream releases, so you are not patching the operating system by hand.
- Where a VPS wins: You get full root access and can tune anything, and for a large site it can be cheaper per gigabyte of RAM.
How to use WordPress Migration (the OSS CMS)?
- Deploy the template, open the Railway domain and finish the WordPress installer. Check Tools, Site Health for the active object cache drop-in.
- On the old site, either export a package with a migration plugin, or download wp-content and take a database dump.
- Import into the new site. With a plugin, upload the package and run its import. Manually, upload files to the /var/www/html volume and import the dump into MariaDB through a TCP proxy.
- Update the site URL with a serialisation-aware tool. A raw SQL find-and-replace can corrupt serialised data.
- Re-save permalinks under Settings, Permalinks, then check media, logins and forms.
- Add your custom domain in Railway, update DNS, and set WP_HOME to the new domain.
mysqldump -h old-host -u olduser -p olddb > site.sql
mysql -h your-mariadb-proxy-host -P your-proxy-port -u wordpress -p wordpress < site.sql
How to self host WordPress Migration on other VPS Services (WordPress self hosting guide)
Running this stack on your own VPS means you handle WordPress, MariaDB and Valkey yourself. The steps below use Docker Compose on any Linux host.
Clone the Repository
Clone the template source and move into the directory.
git clone https://github.com/onepush-dev/wordpress.git your-domain-wp
cd your-domain-wp
Install Dependencies
Confirm Docker and the Compose plugin are installed.
docker --version
docker compose version
Configure Environment Variables
Create a .env file with your domain and passwords.
cat > .env <<'EOF'
WP_HOME=https://your-domain.example.com
MARIADB_PASSWORD=change-me-db
VALKEY_PASSWORD=change-me-valkey
EOF
Start the WordPress Migration Application
Bring up the containers, then open your domain to finish the installer and import your old site.
docker compose up -d
Railway handles TLS, health checks and persistent volumes for you, so on a VPS you own all three.
Official Pricing of WordPress Migration (WordPress pricing)
WordPress itself is free and open source under GPLv2, so there is no license fee to pay for the software.
WordPress Migration cloud vs self hosted comparison (Pricing, features, costs, and more)
Moving a WordPress site comes down to how much you want to manage yourself.
Monthly cost of self hosting WordPress Migration on Railway
Railway bills on usage, so the monthly cost tracks RAM, CPU and traffic across the WordPress, MariaDB and Valkey services.
System Requirements for Hosting WordPress Migration on a VPS
Plan for about 512 MB to 1 GB of RAM for WordPress and MariaDB on a small site, and cap Valkey at 256 MB.
Frequently Asked Questions (FAQs)
Should I use a migration plugin or move the files by hand?
A migration plugin is quicker and handles files and database together, which suits most small and medium sites.
Why does my import fail partway through with an upload error?
Large packages can hit PHP limits.
How do I change the site URL without breaking my content?
Use a tool that understands PHP serialised data, since a raw SQL find-and-replace can corrupt serialised options.
Will my emails keep working after the move?
Mail does not move with the site, so configure your SMTP or transactional mail plugin on the new deployment.
Will visitors see downtime when I switch DNS?
Usually only a short window while DNS propagates, so test on the Railway domain first.
Do I need to flush the object cache after importing?
Yes, flush it so stale options from the old site are not served. Site Health will show whether the Redis Object Cache drop-in on Valkey is active.
Template Content
MariaDB
mariadb:12.3.3