Score:-1

Should installing local Drush and Drupal via Composer on my personal computer be any different than on hosting platform?

vn flag

Should installing local Drush and corresponding Drupal via Composer on a personal computer with Ubuntu-Apache-MySQL-PHP be any different than on a shared hosting platform?

Should I just do the following in both environments?

cd web_application_root
composer create-project drupal/recommended-project my_site_name_dir
# PHP MYADMIN GUI
# GUI install
composer require drupal/metatag
Score:0
cn flag

Short answer

When installing drupal and drush with composer, you can do it the same way on a shared hosting platform as you do locally-- assuming the shared hosting platform gives you access to the same command-line tools that you have available locally.

Long answer: Use version control

Generally speaking, you want to use composer with git, and you will check in your composer.json and composer.lock files into the git repo. You would then clone that repo to your local environment + your shared hosting environment.

This way, although you have multiple copies of composer.json and composer.lock, they are all managed via the git repo, so it is much easier to sync changes between your local environment and the shared hosting server.

vn flag
Thank you, and I appreciate the "generally speaking" as Git might be an overkill for me because I aim to create just one Drupal website, for myself (no team members), for my personal services, only core with Metatag module, only text, updated directly online.
Kevin avatar
in flag
Not using version control is a huge mistake no matter how few people will be touching it. It is never overkill. Do yourself a favor and use it.
cn flag
@drupal_love I develop everything by myself, but I do use git on all my projects now. It really comes in handy when you need to do a rollback because something goes wrong with a major upgrade (such as the coming Drupal 10 upgrade this year). When you're comfortable with version control, it can be set up in less than five minutes-- in my case, it's `git init` the repo and copy my SSH public key file to shared hosting-- so it's really not huge additional overhead.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.