Move away content from public_html in a git repo on live server |
I get the security thing about moving content away from public_html/.
My workflow is that I push from my local machine to GitHub and to my live server. Yes, I can change the structure on my live server (like moving certain content up one level), but I guess I must keep it on my local machine. How do I push to my live server after having moved content up one level?
In your local dev machine you create a public (or public_html) folder. Move everything in there. Push it to GitHub and after running git on your public server you will need to change document_root to your new public folder.
Or scrap git on live server and re-download everything, if you don't want double public_html folders.
I have a Ubuntu VPS and mirror image /var/www/my-domain.tld/public_html. RSync used to copy from localhost to server, only takes second.
Github used for backups and slow compared too RSync. (11-13-2019, 12:14 PM)jreklund Wrote: In your local dev machine you create a public (or public_html) folder. Move everything in there. Push it to GitHub and after running git on your public server you will need to change document_root to your new public folder.OK, so how about if I change my project on my local machine to something like this (and change the folder paths in index.php accordingly): my_project l--public_html/ l l--index.php l--application/ l--views/ l--system/ Finally, I push to my live server one level up (from the folder public_html). (11-14-2019, 12:36 PM)jreklund Wrote: Yep, that works.Tack så mycket / Many thanks (11-14-2019, 02:24 AM)John_Betong Wrote: I have a Ubuntu VPS and mirror image /var/www/my-domain.tld/public_html. RSync used to copy from localhost to server, only takes second.I am on windows. Thanks anyway. |
Welcome Guest, Not a member yet? Register Sign In |