5

Question for web devs. I have to manage a simple php website and I am tired of filezilla+notepad++ combo. I need something more modern. Tried visual studio code+simple ftp integration but it doesn't seem to download some of the folders. Can you advice any other alternative?

Comments
  • 2
    If you have SSH access, you could sync it over a Git- or Mercurial-Repo.
  • 1
    Umm sftp would suffice for file transfers if it's a simple website.

    Last time I deployed I had an ExpressJS webapp and had docker + githooks for continuous integration which was awesome but I was a bit of a hurdle to set up.
  • 1
    I don't have root access.

    It's a simple php website without any framework.
  • 1
    WinSCP script for syncing your local folder with the server, PhpStorm and Xdebug
  • 1
    Winscp and vsCode works well.

    Open in winscp set your editor as vsCode and on save it will save back to server.

    Do you have . folders Or hidden folders? You might need to enable visibility in your FTP client to see them.

    Otherwise set up Git if you can.
  • 1
    After half day of trial and error I managed to sort it out with vs code and some extensions. I used remote fs (for fetching all remote files from ftp/sftp), then also used sshlogin(for logging into terminal in prod)
  • 2
    @SauceBoss So if I keep website files in git then I need to test them in some staging environment and after that deploy them to ftp somehow?
  • 0
    Set up ssh to the server and make a script to do the deployment from git.
  • 1
    @TheCapeGreek what about if im working on some gameserver files during runtime via sftp? If I deploy to git and then deploy from git to sftp it will delete all files and replace them with new thus my server will crash? I dont want to shutdown gameserver everytime Im deploying minor changes. In that case working directly through sftp is better for me.
  • 0
    @zemaitis it’s the same thing, and no, Git won’t replace all files only changes made to files based on the latest merge. Gits history tracking comes in handy here.

    Replacing full files - as you do with sftp can cause major issues if you are working directly with live code and say upload the main config file with errors, instead of a test / dev environment that’s a replica that can catch these problems before a release.
  • 0
    @C0D4 ok then I will start with website via ftp first. So now I will install phpstorm and will download all remote files and then put them on github. Will open a new project and checkout my github files. Whats the best way to setup deployment script from github to my ftp server via ssh?
  • 1
    @zemaitis can you install Git on the server?
    If you can just login through ssh and do a Git clone once you have it in Git correctly.
    Future changes are a Git pull away, and if you want to automate you can enable webhooks or look into auto deployments.

    If you can’t, it gets tricky but you could do a webhook to detect changes, and download the repo to a temp location, and then copy it over the top of your web directory.
  • 2
    If you have money or you are a student, go with PHPStorm Or Webstorm
Add Comment