![]() |
Move away content from public_html in a git repo on live server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html) +--- Forum: General Help (https://forum.codeigniter.com/forum-24.html) +--- Thread: Move away content from public_html in a git repo on live server (/thread-74833.html) |
Move away content from public_html in a git repo on live server - muuucho - 11-13-2019 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? RE: Move away content from public_html in a git repo on live server - jreklund - 11-13-2019 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. RE: Move away content from public_html in a git repo on live server - John_Betong - 11-14-2019 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. RE: Move away content from public_html in a git repo on live server - muuucho - 11-14-2019 (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). RE: Move away content from public_html in a git repo on live server - jreklund - 11-14-2019 Yep, that works. RE: Move away content from public_html in a git repo on live server - muuucho - 11-15-2019 (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. |