Skip to content

mateusz-zadorozny/lighter_stage_sync_for_gridpane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Why I created Lighter Stage sync?

Some of the sites deployed on my GridPane servers have massive media files (over 10GB), so creating staging sites with full sync uses a lot of disk space.

With proper config we sync the staging with our live site, but we use the media just from the live site - saving the disk space on the server.

How to use?

  1. Create a staging site through the GridPane panel, set SSL (or not) and check if it works
  2. Create backup for your primary site in GridPane panel in case you make an error while editing the bash file
  3. Create a copy of lighter_stage_sync_for_gridpane.sh file and name it sync_light.sh (to be ignored by Git)
  4. Fill in your private key location in sync_light.sh in line 4
  5. Add GridPane servers you want to work with (line 7 for friendly names, line 8 for IPs)
  6. Save the file
  7. In terminal in the folder run following command: bash sync_light.sh
  8. Pick the server and choose the staging site you want to sync
  9. After database sync the script will ask you to sync plugins, theme or folders in in wp-uploads/content (not the media ones)
  10. Finally the script will ask you for nginx rules rewrite to use the live site media instead of ones in staging.yoursite.com/... folders

After initial sync - rewriting nginx is not necessary. The staging site should use the media from the live site.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages