php - simultaneously update hundreds of sites on the same server -


i'm working on hostgator dedicated server there hundreds of sites have similarities in file structure , .php files common each site.

i able work on 1 site (a "model" site) , sync changes across other sites. open either having happen automatically or semi-manually (running script or command.) one requirement since few sites different need excluded sync. techniques achieving this? here have thought of far...

  • rsync : rsync capable of this? have never used heard great copying files 1 server location another.

  • ssh : not super comfortable working shell commands can imagine "proper" place making these kinds of changes. (not sure how loop , make changes though directories except few different)

  • php : if possible i'd love able php except server uses suphp security , can't around permissions requires. may able switch fcgi though... (open suggestions also)

my file structure follows:

     /home/model/     /home/site1/     /home/site2/     /home/site3/     /home/exception/     /home/site5/     /home/site6/     /home/exception/ 

bash commands more suitable , tends easier,
such has combine rysnc plus symbolic links ln

in nutshell,

ln -s /home/model/ /home/site1  ln -s /home/model/ /home/site2 ln -s /home/model/ /home/site3 

so, soft-link site1,site2,site3 model

what symbolic link ?
http://en.wikipedia.org/wiki/symbolic_link

after that, need rsync changes directory model,
, changes apply site1,site2,site3
(because directories symbolic link model)

as site5, site6, since difference, scp fit shoe better.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -