A staging environment is a copy of a live website where clients can test changes without breaking anything. It's a premium feature that's cheap to provide and extremely valuable to clients.
What Staging Solves
| Problem Without Staging | With Staging | |------------------------|-------------| | Plugin update breaks site | Test update on staging first | | New design looks wrong | Preview on staging, fix, then deploy | | Custom code has bugs | Debug on staging, deploy clean | | Client wants to experiment | Experiment safely on staging |
Every time a client breaks their live site, you get a support ticket. Staging prevents those tickets.
Implementation
Manual Staging (Simple)
Create a subdomain staging.clientsite.com with a copy of the live site:
# Copy files
cp -r /home/client/public_html /home/client/staging
# Copy database
mysqldump -u root -p clientdb > /tmp/staging.sql
mysql -u root -p clientdb_staging < /tmp/staging.sql
# Update wp-config.php in staging
sed -i "s/clientdb/clientdb_staging/" /home/client/staging/wp-config.php
sed -i "s|clientsite.com|staging.clientsite.com|" /home/client/staging/wp-config.php
Automated Staging (Professional)
Use WP-CLI for automated staging creation:
#!/bin/bash
SITE=$1
STAGING_DIR="/home/$SITE/staging"
LIVE_DIR="/home/$SITE/public_html"
# Clone files
rsync -a "$LIVE_DIR/" "$STAGING_DIR/"
# Clone database
wp db export /tmp/staging.sql --path="$LIVE_DIR"
wp db import /tmp/staging.sql --path="$STAGING_DIR"
# Update URLs
wp search-replace "$SITE.com" "staging.$SITE.com" --path="$STAGING_DIR"
Push-to-Live
When the client is happy with staging changes:
#!/bin/bash
# Backup live site first
wp db export /tmp/live_backup.sql --path="$LIVE_DIR"
# Push staging to live
rsync -a "$STAGING_DIR/" "$LIVE_DIR/"
wp db import /tmp/staging.sql --path="$LIVE_DIR"
wp search-replace "staging.$SITE.com" "$SITE.com" --path="$LIVE_DIR"
Client Interface
Offer staging through a simple interface in your client portal:
| Action | Button | Expected Time | |--------|--------|---------------| | Create staging | "Create Staging Site" | 1-3 minutes | | Refresh staging (re-clone from live) | "Sync from Live" | 1-3 minutes | | Push staging to live | "Deploy to Live" | 2-5 minutes | | Delete staging | "Remove Staging" | Instant |
Pricing
| Approach | Price | |----------|-------| | Included in premium plans | $0 extra (differentiator) | | Standalone add-on | $5-10/month | | Per-use (create/deploy) | $5 per action |
Including staging in premium plans drives upgrades from basic to premium. As an add-on, it's nearly pure profit since the resource cost is minimal.
Resource Requirements
A staging site uses approximately the same resources as the live site. On your reseller hosting plan, account for double the storage per client that uses staging.
| Client Site Size | Staging Storage Needed | Database Overhead | |-----------------|----------------------|-------------------| | Small (< 1GB) | 1GB extra | Minimal | | Medium (1-5GB) | 5GB extra | Moderate | | Large (5-20GB) | 20GB extra | Significant |
Staging environments are one of the easiest premium features to offer. Low cost, high perceived value, and they genuinely help clients maintain better websites.
