close

April 2024 only! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

ss sync staging

This command runs the associated bash script, which, if STAGING_SITE is enabled in ss-config (set to true) then it will proceed to copy over all your files from the production site’s folder into the staging site’s folder, with the exception of the /uploads/ folder… this is to save space, and avoid headaches. For example, very small cloud servers don’t have lots of disk space, so there’s no reason to copy over massive amounts of media uploads. Instead, using some Linux symlink magic, SlickStack simply tells the staging site (subdomain) to load its media upload files from the production site’s uploads folder. It gets even better, because if you (stupidly) upload a media file to the staging site’s Media Library in WordPress, it will be retained by the production site’s folder… however, that new upload will not be recognized in the production site’s WordPress database unless/until you sync the staging database to production, which is a different matter.

Routine:

  1. runs /var/www/ss-sync-staging
About the Author

Jesse Nickles

Jesse is the lead developer for the SlickStack project and also for HoverCraft, the accompanying free WordPress theme. He has been customizing WordPress for both personal websites and SEO clients for over 15+ years, with a focus on simplicity and longevity.

Leave a Reply

Your email address will not be published. Required fields are marked *

Thanks to our generous sponsors for their support!