Deploy WooCommerce
A one-click install of WooCommerce on WordPress.
WooCommerce
Just deployed
/var/www/html
MariaDB
Just deployed
/var/lib/mysql
Deploy and Host WooCommerce on Railway
A one-click WooCommerce deployment with automated setup, optional test data generation, and persistent storage. This template includes WordPress, WooCommerce, WP-CLI, and the wc-smooth-generator plugin for creating realistic product data.
About Hosting WooCommerce on Railway
This template deploys a complete WooCommerce stack: a MySQL database, WordPress with WooCommerce pre-installed, and automated configuration. WordPress auto-installs on first deployment with WooCommerce activated and ready to use. The included wc-smooth-generator plugin can optionally create realistic test products, customers, and orders for development and demo purposes. Environment variables can be pre-configured to connect the database and skip manual setup wizards.
Common Use Cases
- E-commerce stores needing a fast, managed WooCommerce hosting solution
- Development and staging environments with automated test data
- WooCommerce headless backends for modern frontends (Next.js, React, etc.)
- Agencies deploying client stores with pre-configured settings
- Learning WooCommerce development with realistic product catalogs
Dependencies for WooCommerce Hosting
- MySQL 8.0+ (included in template)
- Docker runtime (provided by Railway)
Deployment Dependencies
- WordPress Official Docker Image
- WooCommerce Plugin
- WC Smooth Generator
- WooCommerce Storefront Theme
- MariaDB
Implementation Details
After deployment, WordPress and WooCommerce auto-install based on the minimal configuration steps below. The database and persistent volume are automatically provisioned.
Configuring WordPress You must set these required environment variables in Railway when deploying:
WORDPRESS_ADMIN_USER- Admin username (avoid "admin" for security)WORDPRESS_ADMIN_PASSWORD- Your secure admin password (make it secure)WORDPRESS_ADMIN_EMAIL- Your admin email address
Configuring WooCommerce (Optional) You can optionally pre-configure WooCommerce with these environment variables:
WOOCOMMERCE_STORE_COUNTRY- Store location (format:US:CAfor California,GBfor UK)WOOCOMMERCE_CURRENCY- Store currency (USD,EUR,GBP, etc.)WOOCOMMERCE_GENERATE_DATA- Set totrueto generate test product, customer and order data
If these options are not provided, you can manually configure your WooCommerce store later and add test data through the WC Smooth Generator Plugin interface.
Deployment
- Wait for the initial deployment to complete (usually 2-3 minutes)
- Visit your site URL provided by Railway
- Log in to WordPress admin at
https://your-domain/wp-adminwith credentials set above - WooCommerce will be pre-configured based on your environment variables
- If
WOOCOMMERCE_GENERATE_DATA=true, test products and orders will be created automatically
For further details, you can refer to the step-by-step guide: How to Deploy WooCommerce on Railway.
Why Deploy WooCommerce on Railway?
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 WooCommerce 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.
Template Content
WooCommerce
epilocal/woocommerce-oneclickWORDPRESS_ADMIN_USER
WordPress admin user (username for logging into WP admin)
WORDPRESS_ADMIN_EMAIL
WordPress admin user's email address
WORDPRESS_ADMIN_PASSWORD
WordPress admin password (password for logging into WP admin)
MariaDB
mariadb:latest