I'd like to use drush methods in the remote server. As far as I know I have to install Drush in the remote server. But my server provider tell me that Drush has many conflicts with other modules that the server is already running. How do you manage to use Drush in remote server? Is my server provider answer acceptable?

  • Hmmm that sounds a little fishy...could you ask them to specify which of these other modules the server is running that conflict with Drush? And how they conflict? That might help to confirm whether their statement is fair or not. For the record, I've never had a problem installing/using Drush on any server (although I've never tried to get it on a shared host before) – Clive May 31 '12 at 11:12
  • I'll try to deep into this. It is a Managed Dedicated Server (not shared). They told I can install myself if I change to a Not Managed Dedicated Server. – chefnelone May 31 '12 at 11:22
  • 1
    Sounds like they're worried about installing Drush because they don't know if it'll cause problems. But, if they're managing the server, you've kinda got to respect the decision that they make. After all, if installing Drush does mess something up then it's on them to fix it – Clive May 31 '12 at 11:29
  • I allready managed to convince some clients' managing providers there is no harm. And i am quite convinced there really aint. Basically - drush is a set of php files. All it needs is php cli, which shouldnt be a problem. – mojzis May 31 '12 at 11:58
  • my server provider is pretty strict about this. No explanation at all. If I want Drush installed I have to change from managed to unmanaged server. Closed. – chefnelone Jun 1 '12 at 7:58

If you've any SSH access you can install Drush by yourself. Simply download the tar.gz from drupal.org and untar it into a folder on your server. Then you may add execution rights to drush/drush and you will able to use Drush perfectly (simply you just need to add all path before the command, for example /var/www/drush/drush updb).

Like others said, you should ask more informations about the conflicts and tell them that it's totally absurd that Drush create conflicts with other modules as it's require only php-cli.

I already installed drush on some servers and even on shared server and it works perfectly as you've SSH access.

| improve this answer | |
  • I'll try. I understand that I won't need any installation at all on remote server, I just need to upload the drush folder. Am I right? – chefnelone Jun 1 '12 at 8:01
  • Yes, you're right – yvan Jun 1 '12 at 8:21
  • I'm following this but I can't get it working. This is what I did: 1) put drush folder in www/then I have this path to the drush file: www/drush/drush 2) I change the permisson of drush file to 777 3)I run this method: www/drush/drush status and I get this message: www/drush/drush: line 26: /bin/uname: Permission denied. But something is working because below this error message I get these lines: PHP configuration : /usr/local/lib/php.ini || Drush version : 5.3 || Drush configuration : – chefnelone Jun 1 '12 at 15:21
  • Done. I got it running just fine. But it still shows this message every time I run a method just above the results: drush/drush: line 26: /bin/uname: Permission Deny – chefnelone Jun 1 '12 at 16:00
  • It's not a big deal this error as uname is just a command to get the name and version of your os. Seems to be its one limitation from yours hosting company. – yvan Jun 4 '12 at 6:28

It is possible to use Drush with a Drupal site that is running on a remote server that does not have Drush installed. This is possible because the Drush commands drush rsync and drush sql-sync work by composing ssh commands; if you set up your site alias configuration carefully, then you can copy your site to a local machine to operate on it.

In order for sql-sync to work without Drush on the remote system, you must define the 'databases' and '%dump-dir' variables in your site alias. Otherwise, Drush will try to use Drush on the remote system to look up these values. See example.aliases.drushrc.php for more information.

Note that it is really useful to be able to at least run drush updatedb on the remote server, so that you can update your database after you rsync new code over. Of course you can do this through the GUI too, but Drush is faster. The Resources page on drush.org lists some hosting providers that are Drush-friendly.

| improve this answer | |
  • very helpful. By your words I understand that I have to work on local server and keep it sync with the remote server by using the methods: drush rsync and sql-sync but won't be able to run drush updatedb on remote server if drush is not installed in remote server. Do I need to put the drush folder (the tar.gz file) in my server as yvan mention in the answer below? – chefnelone Jun 1 '12 at 7:53
  • There is info on how to install Drush in the README.txt file at drupalcode.org/project/drush.git/blob/HEAD:/README.txt. See also this recent blog post on the subject: robinmonks.com/2012/05/…. Please avoid the Drush-5.3 release; it was recently released with some bugs. Use 5.2, or HEAD of the master branch in git. – greg_1_anderson Jun 1 '12 at 21:23

Alternatively this module may allow you to use Drush on a remote server without asking your host provider to install it: https://drupal.org/project/drushweb

Some details from the module's project page:

This module allows to run Drush without being granted access to the machine it relies on. It may be useful on shared hosts that do not provide SSH access to servers.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.