• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How Install Drush (Drupal Shell) on Plesk 12.5.x

9musashi

Basic Pleskian
Hello, I'm just sign up with Plesk after impress with the neat and clean panel, and especially nginx standalone feature on this panel. I have problem with Drush (Drupal Shell) 8 installation folowing this guide http://docs.drush.org/en/master/install/

Code:
# php drush.phar core-status
PHP Parse error:  syntax error, unexpected '[' in phar:///root/temp/drush.phar/includes/startup.inc on line 63
I suspect Drush required minimum PHP CLI ver 5.4.5 or newer. How do I upgrade PHP CLI from 5.3 (very old) to newer version without breaking Plesk itself ?

Thank you
 
I reccomend to use this trick, just change the path in .bash_profile to: PATH=/opt/plesk/php/5.6/bin:$PATH:$HOME/bin
Bash, serching for the executable php, will find it in /opt/plesk/php/5.6/bin and will execute Drush using the latest supported php version.
Php will get all the configuration data in php.ini from /opt/plesk/php/5.6/etc/php.ini
 
Hi Oto, I already figure it out. Just rename old php
Code:
mv /usr/bin/php /usr/bin/php53

And create new symlink to php 5.4
Code:
ln -s /opt/plesk/php/5.4/bin/php /usr/bin/php

But I dont know if it safe to do that ?
 
I don't think so. Your system should work with 5.3 'cause that version is what other applications are expecting.
You can also upgrade system php activating other repository like EPEL or Atomic.
As usual there are many way to make Drush work, but I'd prefer the one that change as little as possible the base system and Plesk itself.
 
I tried your solution, add this line at ~/.bash_profile
Code:
PATH=/opt/plesk/php/5.6/bin:$PATH:$HOME/bin
But its not working
Code:
# drush init
PHP Parse error:  syntax error, unexpected '[' in phar:///usr/local/bin/drush/includes/startup.inc on line 63
 
That's strange.

Have you restarted the Bash session? (Just log out and log in again)
Please check the php version: php -v
Have you set drush.phar as executable? (chmod +x drush.phar)
Have you initiated Drush? (drush init)

LMK
 
Hi Oto, I retried your suggestion with ~/.bash_profile because I realized I forgot to logout and login SSH. And after retried your previous suggestion, Drush is works now. I decide to follow your trick instead of my symlink way. Thanks Oto.
 
Back
Top