Skip to content

Instantly share code, notes, and snippets.

@leymannx
Last active February 17, 2024 17:33
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save leymannx/8e6f2fd3fe9b94aea2162cfcf417da1e to your computer and use it in GitHub Desktop.
Save leymannx/8e6f2fd3fe9b94aea2162cfcf417da1e to your computer and use it in GitHub Desktop.
1&1 ionos shared webhosting command line PHP Drush Composer Drupal
# https://www.ionos.com/community/hosting/php/using-php-composer-in-11-ionos-webhosting-packages/
php -v
# PHP 4.4.9 (cgi-fcgi) (built: Nov 7 2018 13:27:00)
# Copyright (c) 1997-2008 The PHP Group
# Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
/usr/bin/php7.1-cli -v
# PHP 7.1.25 (cli) (built: Dec 10 2018 10:11:36) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
curl -sS https://getcomposer.org/installer | /usr/bin/php7.1-cli
# All settings correct for using Composer
# Downloading...
# Composer (version 1.8.0) successfully installed to: /homepages/xx/xxxxxxxxxx/htdocs/composer.phar
# Use it: php composer.phar
wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar
chmod +x drush.phar
/usr/bin/php7.1-cli drush.phar self-update
/usr/bin/php7.1-cli composer.phar global require drush/drush:"<9"
echo "alias php='/usr/bin/php7.1-cli'" >> ~/.bash_profile
echo "alias composer='php ~/composer.phar'" >> ~/.bash_profile
echo "alias drush='php ~/drush.phar'" >> ~/.bash_profile
echo "export DRUSH_LAUNCHER_FALLBACK='/usr/bin/php7.1-cli ~/.composer/vendor/bin/drush'" >> ~/.bash_profile
. ~/.bash_profile
php -v
# PHP 7.1.25 (cli) (built: Dec 10 2018 10:11:36) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
drush --version
# Drush Launcher Version: 0.6.0
# Drush Version: 8.1.18
composer --version
# Composer version 1.8.0 2018-12-03 10:31:16
@hissDev
Copy link

hissDev commented Apr 30, 2021

THX thousand times ;)

@alinabasarabeanu
Copy link

Really useful
Many thanks

@jairT0rres
Copy link

Excelente aportación

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment