0
votes

Is it ok to use composer on localhost to upgrade core and modules, and then FTP the files to the server?

I'm on shared hosting, and although it's possible to use SSH with GIT, it's a pain to set up...

Some information about my use case:

  • No multiple users, no team, no multiple developers, I'm a one man show
  • Small business sites
  • I'm the only person adding content
  • No need for version control, no module development, no coding
I'm a site builder, and the only code I touch are the CSS files of the theme. Will this workflow be ok?
  1. Install Drupal 8 with composer
  2. Import site into aquia dev desktop
  3. Use composer to update modules and core
  4. FTP sites folder to server
  5. Use backup migrate when I alternate working from live to localhost and vice versa
1
"Is it okay" - yes, that's how you can do it. What have you tried so far to get this working? What are the remaining problems?Nico Haase
I haven't tried because I thought it was the "wrong" way to do things...!user78344

1 Answers

1
votes

The question is very general and, I think, it has some "conflict" of ideas.

Your question:

Is it ok to use composer on localhost to upgrade core and modules, and then FTP the files to the server

Technically yes. But this method has lots of disadvantages:

  1. DR (Disaster Recovery) - What if you uploaded something that doesn't work? How quickly can you recover? With git its a matter of git checkout
  2. Composer is environment-agnostic - When you run composer install, composer checks some dependencies in you machine and then decides what to install. What if you are missing some required packages in you remote machine? To fix this you should run composer install on the remote machine (via ssh)
  3. FTP might take too long to finish - As apposed to git (or rsync) FTP will upload all files to the server. Other tools will upload just the diff between previous version and the current. So I will always choose rsync over FTP
  4. Security - use SFTP

Your question:

I'm a site builder, and the only code I touch are the CSS files of the theme. Will this workflow be ok

Sounds correct - but remember the composer issue..