Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Lokedi's avatar

Make automatically deployment from gitlab in ftp fast

Hi, I have this script that I deploy automatically, I know it's not ok to put the variables in the script but it's just for testing. How can I deploy faster? without deleting vendor and node_modules and also storage ... and can run automatic craftsman commands thanks

variables:
  HOST: 
  USERNAME: 
  PASSWORD: 

deploy:
  script:
    - apt-get update -qq && apt-get install -y -qq lftp
    - lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./ ./public_html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
  only:
    - master
0 likes
2 replies
martinbean's avatar

@danylok you could maybe use something like DeployHQ.

It supports FTP-based deployments, automatic deployments when pushing to a Git repository, and has a free tier. I use it myself for a legacy project.

1 like
laracoft's avatar

@lokedi

I use https://deployer.org/ which in turns uses SSH and rsync.

My trick to speed things up is to copy the vendor from an earlier release and then performing an rsync on it.

But if you must use FTP, I think it is as fast as it gets.

Please or to participate in this conversation.