Documentation
Everything wp-stage-sync does, one page per topic. The same pages are in the repository's docs/ folder.
- Getting started wp-stage-sync copies a live WordPress site to its staging site on the same Linux server.
- The interactive app Run wp-stage-sync with no arguments to open the interactive app, a full-screen terminal wizard that sets up a site pair and runs a sync.
- Unattended runs The -u flag runs a sync without the interactive app, from a site configuration saved earlier, so it fits cron jobs and scripts.
- Configuration wp-stage-sync keeps one config.json per site pair and one global settings.json, both under ~/.config/wp-stage-sync/.
- How a sync works A sync runs a fixed list of steps, the same in the TUI and in unattended mode: checks that change nothing, then the database, then the files, then WP-CLI on the staging site.
- Cache plugins The import copies live's plugin settings to the staging site, including CDN, Cloudflare and firewall credentials, and the file sync copies config files that hold live's paths.
- Object cache A persistent object cache drop-in (wp-content/object-cache.php) is copied to the staging site with the other files, so staging connects to the same Redis or Memcached server as live.
- Servers The interactive app lists the WordPress sites on the server by reading the web server configs, then the file system, and pairs each live site with its staging site by folder name.
- Promote and restore Promote copies selected themes, plugins and must-use plugins from the staging site to the live site, after it backs up the live copies.
- Safety The default sync reads the live site and writes only to the staging site.
- Troubleshooting This page lists the errors and warnings a sync can print, grouped by the step that prints them, with the reason and the fix.