These instructions are for installing older versions of Drush that pre-date the Composer requirement. Please try to install Drush using the method in Installing Drush 6 and 7 on Shared Hosting Accounts first, unless you need an older version of Drush, or you cannot install Composer on your shared host.
- If you don't already have shell access, request access to SSH for your shared hosting account (e.g. for Hostmonster or Green Geeks: open a new support ticket with Tech Support (UPDATE: Shell access can now be enabled from cPanel for some hostmonster hosting accounts). For other Hosting services you may need to upgrade to use SSH.)
- Once you have received SSH access to your site, open a new Terminal and login to your site by typing the following
ssh username@yourdomain.com
or any additional user login string provided by your Hosting service - Enter your password when prompted
- By default, you should be in your home directory (~). If you are not in your home directory, navigate yourself there by using the
cd ~
(cd = change directory command). The'~'
is an alias for your home directory. On Hostmonster--and nearly every other Linux shared hosting situation--your website directory is located at ~/public_html. - Confirm you are in your home directory by typing the bash shell command
ls
, which will list the files and folders in the current directory. On Hostmonster, you should seepublic_html/
,public_ftp
, and a bunch of other files. Make special note of a file named.bashrc
, as we will be editing it later. - Download Drush by typing
wget https://github.com/drush-ops/drush/archive/6.1.0.zip
(Drush 6.1.0 is the last version of Drush that doesn't require Composer). Extract the .zip file by typing inunzip drush-6.1.0.zip
and remove the zip file by typingrm drush-6.1.0.zip
.
*Tip: typeclear
and hit enter. This will clear your screen, allow you to read the screen more easily. Do this as much as you want to throughout this process.
**Important: If your host's configuration does not allow for thewget
command, you may alternately download the zip file referenced above manually and upload and extract via the host's cPanel File Manager, or an ftp program of your choice. - Type
ls
again, to list your directory. You should now seedrush/
in the directory (if the directory is drush-6.x, rename to drush withmv
command). - Next, in order to use Drush across our installation&emdash;in all of our sub-folders&emdash;we need to add a line to our
.bashrc
file (Please note: some Web hosts that use Free BSD or other UNIX operating systems may not have a.bashrc
file, but a.cshrc
file, which you edit in the same manner). While still in your home directory, type the following:nano .bashrc
. This will open up.bashrc
in a text editor namednano
.
*note: For GoDaddy accounts there is no nano application (for new cPanel accounts nano is available). Use VIM instead. So typevim .bashrc
to edit the file. A good VIM cheatsheet is: http://www.fprintf.net/vimCheatSheet.html]
Locate# User specific aliases and functions
. Underneath that, add the following:alias drush="~/drush/drush"
. Save the file by typingctrl+X
(Exit) and typey
to accept your changes. Please note: the exact symbols for this alias may vary from host to host. If the alias given here doesn't work, you may want to try with single instead of double quotes, or without the = symbol. - Type
source ~/.bashrc
to refresh the alias list and allow the new drush commands to work. - Confirm that Drush is working by typing
drush
at the command prompt and hittingenter
. You should see a list of drush commands. If you do, thensuccess!
- If the previous step doesn't work, type
exit
to end your SSH session, then log back in (See step 2) to restart your session. This refreshes.bashrc
and allows the new drush commands to work. Some hosting providers such as GoDaddy (legacy accounts) use php-cgi in the command line instead of php-cli. The former is not compatible with Drush and if this is your case you have to locate php-cli and then add the following lines to your ~/.bashrc or ~/.bash-profile file:
export COLUMNS alias drush='/usr/local/php5/bin/php ~/drush/drush.php' alias php='/usr/local/php5/bin/php'
You can locate the current path for the php-cli program by typing
whereis php-cli
. The path that this returns should be what is in the first part of your alias statements, i.e. 'usr/local/php5/bin/php'. - You have now added drush hot sauce to your shared host. Awesome!
Once again, this should work on any shared hosting Linux platforms that allow shell access. On Hostmonster or Green Geeks, you have to specifically ask them to turn it on. If you do not have a .bashrc
file in your home directory, try making it by typing touch .bashrc
. You can also try using a file named .profile, .bash_aliases or .bash_profile, depending on your server's setup. If you run into trouble consult your host's documentation or Knowledge Base.
SSH config
Since you'll be using the ssh login prompt a lot, you might consider creating a local alias for your login credentials. Follow this link for detailed instructions. Note that in a Drush site-alias configuration you would use the host name configured in this file as remote-host
and no remote-user
.
Editorial Comments
For all those who didn't really understand the instructions and are just trying to follow it as it is written, here's a bit of advice: only use Drush if you start to understand it, even a little bit. Shell commands and Drush commands are very powerful and not recommended for learning on production sites or sites with a live server deadline, because you can mess things up very quickly. Your Shared Hosting support won't be happy if you create code loops through failure.
Another bit of advice: If you are not a full-time developer, you should always use the stable non-beta releases of Drush, and should never use the additional -y command to avoid the security question "are you sure you want ... ? y/n.
To put it another way: Read the instructions twice, understand what the commands mean and what they do, don't rely solely on copy/paste. In the long run, you will save your self time--which is the whole point of Drush in the first place.
Let's take the alias command as an example; you can exchange the .bashrc alias line with something else like alias ddd='~/drush/drush'
instead of alias drush='~/drush/drush'
. This actually changes the way you use the Drush command later. Your commands will start with ddd [your command] then, instead of drush [your command]. And you can also add other aliases of course, like: alias dddl='~drush/drush en'
, which simplifies thee often-used Drush 'en' command from drush dl
to dddl
. In short, it is well worth your time (and safer) to go ahead and learn how to properly use Bash commands, if you plan on using Drush.
The Drush Documentation is a great place to start. It will teach you about Drush commands, and how to use them.
Comments
drush command not found after following each step
I have followed the above instructions to the letter and when I log back into remote server I keep getting drush: command not found.
One thing I did notice was that my .bashrc was empty. I then created one by typing touch .bashrc and it doesn't come up when I type ls when in my home folder. I can edit it with the nano command but it still isn't listed. What could the problem be?
If you had an empty .bashrc
If you had an empty .bashrc file, you need to add your alias to that file, not create a new one.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Thanks for your reply. I did
Thanks for your reply. I did just edit the .bashrc file to begin with but when I got the drush: command not found I created the .bashrc file.
Are you on
Are you on Hostmonster?
Verify that your folder structure is ~/drush/drush.php, and ~/drush/drush
Try copying this into your .bashrc document:
That's what mine says, on Hostmonster. It said everything except alias drush="etc..." when I first opened it.
If you are not on hostmonster, see if you have a .bash_profile file in ~, and add the line to that file instead.
If none of this works, try typing alias drush="~/drush/drush" at the command prompt, and see if drush works then. If it doesn't work then, you need to try starting over, because something didn't download or unpack right. If that does work, then the issue is with the bashrc file. You may need to ask Hostmonster for support.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Now working!
Thanks so much for your advice @Anthony Pero I now got it working by typing alias drush="~/drush/drush". Thanks for a great tutorial.
Just to be clear: typing
Just to be clear: typing
alias drush="~/drush/drush"
at the command prompt is not persistent. It will only work for your session. As soon as you close your terminal, it won't work anymore, and you'll have to type it again. This was just to test to see if Drush was installed correctly. If you got it working that way, then it's installed correctly, and the issue is with the .bashrc file. Something is not right. Hostmonster's tech support is awesome, and they will get you squared away.Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Hi again, thanks I figured I
Hi again, thanks I figured I had to create a .bash_profile as well in order to have a permanent drush set up rather than temporary as you described above. Putting the drush alias into .bash-profile as well did the trick. I'm not with Hostmonster but another shared hosting environment.
I've now come across a new problem in that my site-aliases (as opposed to drush alias) just keep returning "jailshell: drush command not found" - but I realise that is another issue entirely and not covered by this post so will go a hunting elsewhere for answers. Of course if you can point me to any info on that issue please do.
Thanks for all the support so far.
getting drush working remotely on hostmonster.com site
I had drush installed and working fine if I logged in via ssh to the site; however, I was wanting to be able to use aliases and was getting the message:
bash: drush: command not found
I ended up adding:
'path-aliases' => array (
'%drush' => '/home7/{your hostmonster username}/drush',
'%drush-script' => '/home7/{your hostmonsters username}/drush/drush'
to my drush aliases file and then I was able to do what I wanted. I hope this helps if anyone else is having this trouble. I do agree that Hostmonster support is top notch but I did not need to call them for this.
Peace - Anthony
p.s. keep in mind that they occasionally move home around a bit - on my install the actually directory was /home7 - I tried just using ~ but that did not work as it seems to want an absolute path.
Drush, UNIX, Pair Networks: Finally
I was having the issues and have been helping someone on a UNIX server hosted with pair.com (pair networks). While they don't help you too much since they sell this type of service, I felt comfortable that it was possible.
The biggest problem with everyone's 'solution' is that every environment is setup differently. I didn't even have the .bashrc file, but there was a .cshrc. I added the aliases there and fiddled around a bit and finally got it to work by using :
alias drush '~/drush/drush'
Others have slightly different syntax with '=' signs. I just referenced the other aliases in the .cshrc file and saw how they were formatted and now I am good to go. I didn't have much luck setting up PEAR like others said due to some fopen error but as of now, I don't think I need it.
I did a quick 'drush dl admin_menu' and it downloaded fine. Definitely a bit of a headache when working on shared servers with limited control but hopefully this will help others.
I will update you all if I have other issues but for now, I am glad it works!
worked for me!
i just moved to a new server on pair and found drush was not being found. your post saved be a lot of trial/error!
don't forget to:
% source ~/.cshrc
for the new alias to get picked up.
cheers and hope this helps others. drupal without drush pretty much sucks.
mollyFlogger Nails It For Pair Networks
I just spent an embarrassing amount of time trying to figure out what I was getting the "Command not found" message (I'm also using Pair Networks and had the .cshrc file instead of the .bashrc file). mollyFlogger's solution fixed it immediately. My .cshrc file didn't have any other alias examples to reference so I spun my wheels a bit.
I guess all my wasted time is dues paid by a 'nix n00B. Oh well, thanks for the solution.
Still works
Thanks--
This was the solution I needed! Surprisingly, contacting Pair's tech support didn't uncover this. I will be sure to let them know about this...
A short cut for the lazy
You can make it a bit easier by replacing lines 6-12 with the following:
After confirming that you are in your home directory as per #5 type the following statement
wget -O - http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz | tar -zxf -
replace http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz above with the current link.
(I find it easiest to assemble the statement in notepad or similar, to make sure it's absolutely
correct, and then cut and paste into my terminal, but any way that works is good.)
This will download drush and create a directory called drush in your home directory and expand the contents of the tar file in one nice clean step.
[Optional - or just skip to Step 13]
If there is any doubt that things worked you can verify by typing:
cd drush
ls
You should see something like
LICENSE.txt commands drush drush.info drush_logo-black.png includes
README.txt docs drush.bat drush.php examples
then type cd ~
to get back to your home directory and carry on with step 13
P.S.: Thanks for the great tutorial.... solid work!
Works on Bluehost
I just want to confirm for any folks who might be wondering, that this installed fine on Bluehost. Just follow all of the instructions above. But the first thing you need to do is enable ssh access in CPanel. It is in the security section of CPanel.
It was very easy and now I can use Drush on my Bluehost account! Thank you very much for this easy and concise tutorial!
These steps worked very well
These steps worked very well for a drush installation newbie, thanks so much!
managed hosting on hosteurope ??
Anybody who knows a solution for the managed vserver on hosteurope? No access to .bashrc, support says, they can't do anything about it...
try .bash_profile
try .bash_profile
EDIT: Alternately you can always type in the alias at the command line every time you log in.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Drush on Shared Hosting
One problem I ran into on many shared hosting environments is that only php CGI is installed. I've read in some places that drush can run with php CGI, but I was not able to make it work correctly without php CLI. Drush is already configured and ready to use.
edited by silverwing - removed potential advert sentence
A NOTE TO POINT 15:What this
A NOTE TO POINT 15:
What this point does not make clear is that drush commands will only work when run from inside your drupal install directory!
If you are outside your drupal installation folder, which you could easily presume from the way the above guide is written, and try to test your install of drush, you will at least receive this type of error
so first enter your drupal install directory with the normal cd directory_name command and then run a drush command and it should work.
Thank you for pointing this
Thank you for pointing this out. It is a good tip. However, it is not strictly true. Some Drush commands work system wide, other wise you wouldn't be able to download drupal and install it with Drush. The command given in Step 15 will work in any folder, anywhere in your system.
The great thing about the Drupal documentation is that any one can edit it. Please feel free to edit the point so it reads more correctly in the future.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Got it to work...sort of.
It seems I have installed it correctly and the path seems to work. Although I have to manually input it every time I log in. I do have a problem though. I get this error even if I'm inside a drupal directory.
Okay, I found out the problem
Okay, I found out the problem is at executing the script part. I had to set up the alias like this...
alias drush="/usr/local/php52/bin/php-cli ~/drush/drush.php"
the "/usr...php-cli" part is the location of the php command line interface which executes scripts, I assume. Also, php52 is the version I'm running on my shared host. Make sure you do the same thing. If you don't know what yours is, check the status report in your hosted drupal site and check the version you're using.
I also noticed that after creating the .bashrc file I got a weird looking -bash-3.2-$ for my command prompt. I didn't like and found out that putting this code in the .bashrc file help put it back to normal interface.
My host was Siteground and I hope this message helps anyone else trying to add drush to their site.
If you can still edit your
If you can still edit your post, could you change the title to reflect that this is the solution on Siteground? That will help in search results.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Step 14
I see that I have to repeat step 14
every time I want to use Drush in my shared hosting.
Otherwise it says "Command not found" when I type drush in the command shell.
TheodorosPloumis.com - Drupal developer @ eworx.gr.
strike
strike
I got as far as step 14While
I got as far as step 14
While in the bashrc editor I deleted some of the text by accident while backspacing just below "# User specific aliases and functions." so I exited bashrc and went back to step 13.
Don't remember what happened after that but I exited putty altogether and when I tried to get back in I got error
-bash: /home2/mysite/.bashrc: line 4: unexpected EOF while looking for matching `"' - bash-3.2$
Typed drush and got "Command Not Found".
At that point I just deleted all my Drupal files and reinstalled with a clean database.
My question now is how do I get rid of drush so I can start over clean? Or what do you recommend?
Thanks
Dave
Delete the folder where you
Delete the folder where you unpacked drush. Ask your host if there is a backup copy of your .bashrc file, or if they can provide a fresh copy for you. This should restore everything. If your .bashrc file is fine, all you need to do is remove the drush directory.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
If you are on hostmonster,
If you are on hostmonster, here is what my .bashrc file looks like... you may just be able to copy this into yours, without deleting drush, and drush might work, then.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Bluehost is now looking into
Bluehost is looking into the problem. If not a fix I'd like to know if someone else might have the bashrc code for bluehost maybe?
Lastly, how do I prevent this from happening again?
Thanks folks
Their response not very
Their response not very helpful at all. I haven't touched this file.
>>Looks like you have some custom settings in the .bashrc file. The error message you gave is says it has a syntax error.
Have you tried removing or commenting out the line that says: alias drush=~/drush/drush?
For alias's, you may need to put single quote characters (') around the ~/drush/drush for the alias to work.<<
Post the content of your
Post the content of your bashrc file here. Surround it with the code tag.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
That last line appears broken to me
Not much in this file...
You are missing the quotes
You are missing the quotes around the drush path... this is what you need it to say:
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Bluehost restored the file
Bluehost restored the file after all. They also placed a backup in /etc/bashrc
I will keep your copy handy in case I ever need to do this.
Thanks a lot!
Remote Drush calls with GoDaddy Shared Hosting
GoDaddy Shared Hosting allows you to create your own bash aliases in ~/.bash_profile, which is useful for using SSH to log in and use Drush on their servers, but is useless for remote calls to Drush via SSH. A call to
drush @remote-site status
will complainbash: drush: command not found
.To get remote calls working, you must specify GoDaddy's PHP binary in
php
and the path todrush.php
in%drush-script
for the remote alias:Without the
.php
extension, Drush will try to executedrush ...remote...command...
over SSH, which sucks because there is nodrush
command on GoDaddy's PATH. This way, Drush will call/path/to/php /path/to/drush.php ...remote...command...
over SSH instead.As of this writing, GoDaddy's PHP binary is
/usr/local/php5/bin/php
.I was surprised that it took me three hours of useless blog posts to figure this out on my own.
Where do you put this code?
@aberger ,
Many thanks for this. Does this piece of code go into .bash_profile?
Your help is appreciated.
RD
many thx
saved me my weekend ...
It worked!
Thank you for this procedure!! Very good detail on the instructions. I had to copy over example.drush.ini over to the drush sub-directory and remove the comment notation from the following line: safe_mode= and then it worked great. Thanks again!
-Frederico Garza
I can't thank you enough for this post!
Followed your checklist and worked like magic.
Now because I'm sooooooo new to command lines and drush and such, before actually doing doing anything with it, I need to ask. So in my public_html I have several subfolders, each of them is a site. I do not used a shared installation of drupal, but there is a drupal install for each folder.
Let's say:
-public_hmtl
- SiteA
- SiteB
- SiteC
and so on...
So if I want to execute a core update for Site A ONLY, let's say, ( not Site B, Site C), etc. Where exactly should I be?
in
public_html/SiteA or in public_html/SiteA/sites/default
And for sure it won't affect anything above that folder, right? The other installs are safe and sound, right?
Almost sure that public_html/SiteA is the answer but I would like to confirm, before ...well...crying. :)
Drush commands given will
Drush commands given will work for your site and your site only, as long as you are inside the Drupal directory, in this case SiteA.
Thank you!
I have my test site in folder SiteA and will do all drush tests there so I wanted to make sure.
Oh but I forgot another very important question
I have already SUCCESSFULLY performed the update of drupal core for SiteA, now I have a drupal website ALSO in the root.
Will executing the drupal core update drush command right in the public_html folder, affect the websites in the subfolders ???
I don't believe so. I'm
I don't believe so. I'm pretty sure of that.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
It doesn't. I can confirm it.
Went ahead and just did it. No effect on the subfolders. I suppose it follows the sites/default/config file and acts from there.
My success on 1and1
Just to confirm how I went with a shared hosting package on 1and1.
I followed the instructions and all went well. A couple of changes though. On my host I had to put the following lines in .bash_profile
However, to get drush to work remotely I had to add the following to the aliases.drushrc.php file (names changed to protect the guilty):
Good luck!
Added a local PHP.INI and solved my memory problem
I've recently struggled with this issue and after many failed corrective measures, here is how it was overcome. The error I was getting stated that the allowed memory of 57000000 was exhausted. I was simply trying to upgrade drupal core using the DRUSH UP DRUPAL command. When I used the various commands to determine how much memory I had my shared hosting service reported 128MB.
1. Drush will seek and load a php.ini file found in the drush folder before it searches out your PHP CLI php.ini location. So, grab the example.drush.ini file from examples folder (within the drush folder) and rename it php.ini and place it in the drush/ folder. There was only the memory_limit and the error_reporting lines active.
2. After I did this I started gettting errors that it couldn't find a valid drupal install..., bootstrap errors occurred even though I was running the command from public_html file. So I added to my new php.ini file these commands:
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"
extension=timezonedb.so
extension=mailparse.so
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
3. After adding these the command finally worked. If you review your php.ini file found in the CLI location [my case it's /usr/local/lib/php.ini] you will see many other commands. You may need to add some of these other commands if you have other errors. Add them one at a time and test.
Hope this help those who are struggling.
Thanks emag!
This solved my problem. I searched the web for 3 hours until I stumbled upon this comment. Thanks emag!
Is this some kind of bug ?
php_cli -c <my.php.ini> drush.php HOSTMONSTER
Hi all,
Uf, finally I can use drush without erros now. I Just would like to share my experience so that it can save other people's time.
I spent 3 hrs to install successfully. One thing special is that I cannot use drush* to execute. The only way is explicitly run "php_cli drush.php".
After the installation, I have memory exhausted problem when I disable one module (only one module that without any dependency). I tried to add drash.ini and php.ini in drash directory. it still does not work. The drush status showed that drush knew these two files but the memroy lmit is always 128M.
Then I spent another 3 hrs try to make it work. Finally, I EXPLICITLY add php.ini by php_cli -c
<my.php.ini>
drush.php command. O, it works ....hosais
Awesome instructions!
Installed Drush on Bluehost in a minute, thx guys!
Do VPS systems have a different configuration?
I used to be on Bluehost, and I easily got Drush up with a little help for the path from tech support in a couple of minutes.
Now on my MyHosting.com VPS system, Drush isn't working. I've been emailing tech support all day, and they said they have not idea what's up and then said it's beyond their scope. Finally, I got an email from tech support person who wants to charge me $90 for an hour's work to get Drush working. What?
So, is a VPS system configured so differently that they have to charge an extra amount to get it working? Or is just a foreign tech support treating a woman with no respect?
Susan
VPS is definitely different.
VPS is definitely different. It can be configured any number of ways. In many cases, you have complete control over configuration. Is yours referred to as a "managed" vps? What Operating system is it running? If you are on a Debian or Ubuntu platform, installing drush can be really, really simple, and there are instructions on this site for how to do it. Let me know more about your VPS, and I'll try to point you in the right direction.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Drush not finding base directory
I had an issue where Drush was not finding the root of my Drupal installation. The problem was that when drushrc.php was created, the incorrect base directory was specified:
Not sure how this happened, since I followed the instructions above and didn't touch drushrc.php, but once I changed this
$options['r'] = '/home/USER/d7';
to this:
$options['r'] = '/home/USER/public_html/d7';
it worked.
installing Drush on GoDaddy
getting by with a little help from my friends, this page, and walk-through instructions on this link: http://willjackson.org/blog/installing-drush-godaddy-shared-linux-hosting, I was able to install Drush on our GoDaddy host.
Eureka, it works!
now to just figure out how to upgrade with Drush...
HTH someone else, Amanda
"syntax error near unexpected token `newline' " after type drush
I am using HostMonster shared host and trying to install drush as aboved instruction.
But after I finish the installation and type drush, it "syntax error near unexpected token `newline' " error tips.
/home2/username/drush: line 6: syntax error near unexpected token `newline'
/home2/username/drush: line 6: `'
Is there anyboy could help me to fix the problem, please?
Updated Documentation
The documentation was just updated with the correct alias to the Drush install on GitHub. Sorry for any confusion. I've been going through this process for the last couple of days on Bluehost and updated as I went. You'll have to remove your Drush directory and wget again.
So many thanks for your quick and useful reply.
Hi dear Geijutsuka,
So many thanks for your quick and useful reply. I have installed the drush successfully and upgrade our Drupal.
By the way, if there is any code that I can only check the modules which need to update then we can update the modules separately because there are some modules we don't need to update.
Drush commands
WebDux.com -
You can get of all your available drush commands by typing in
drush help
. If you want to see a list of updates, type indrush ups
. You can find a list of update commands and their arguments here: http://drushcommands.com/#pm-updateWarning: Always use Drush with caution.
Contact me directly if you have any more questions--comment threads aren't the best place for conversations.
Also, you can use https:/
Also, you can use https://drupal.org/project/update_advanced to "pin" certain versions of modules, and prevent them from updating automatically while updating with Drush.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Worked on Shared Hosting on Hostgator!
Thanks for the instructions Worked on Hostgator! Drush life!
What IP to use?
My hosting says they will activate SSH access only if I tell them the IP address I will use to access.
Is this request normal?? How can I know the IP I will have?
Thanks
Sometimes
Hopefully you've got around this limitation by now, as this was 6 weeks or so back. But I see nobody answered the question:
Some hosts are cautious about giving SSH access. A good reason to be cautious is that people sometimes ask for it without knowing what they're doing - the host doesn't want lots of people opening tickets to say "I've broken it". A bad reason to be cautious is if they think SSH is insecure - it's no more insecure than, say, cron, so if their security policy relies on not giving people SSH access it's not a good start.
How can you know the IP you'll use? If you connect through the internet connection at work / college etc, the chances are it will always be the same. Use whatismyip.com to find it. If you connect at home, it all depends on your ISP. Some ISPs give subscribers a "static" IP (it's the same each time you connect); most, especially cheaper ones, allocate you any IP from their pool each time you reconnect. If that's the case, you cannot give your host your specific IP.
This signature is currently blank
Drush is at Github now and seems to require Composer
It looks like Anthony updated this to reflect Drush being moved to Github. I downloaded the Zip file from the main Github project page - https://github.com/drush-ops/drush/archive/master.zip
Got thru all of the instructions and drush tried to run but threw error -
I did not see any mention of this in these Docs. Is this new? or do the instructions need to be updated some more? or did I download and extract the wrong file?
Thanks,
Steve
What host are you using,
What host are you using, Steve? And what package did you purchase from them?
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Nearly Free Speech -
Nearly Free Speech - nearlyfreespeech.net
Did the two comments below
Did the two comments below help you, Steve?
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
My name isn't Steve but the
My name isn't Steve but the two comments below both fail for different reasons. :-(
[deleted duplicate]
[deleted duplicate]
Download composer (possibly
Download composer (possibly to your drush directory):
: wget https://getcomposer.org/download/1.0.0-alpha8/composer.phar
Then run the following to complete the drush installation:
: php composer.phar install
Trying this out and getting:
Dl'd Composer into the drush directory.
Trying this out and getting:
Any ideas? Google doesn't turn up much.
on hostmonster
php-cli -r "readfile('https://getcomposer.org/installer');" | php
cd ~/.composer/vendor/bin
php-cli ./composer.phar global require drush/drush:6.*
nano ~/.bashrc
alias drush="~/.composer/vendor/bin/drush"
source ~/.bashrc
First line of command gives:
First line of command gives:
This is a shared host, no root or sudo access.
Installing Composer and Drush on Hostmonster
The comment for installing on Hostmonster didn't quite work for me or I was missing something. Here's what worked:
cd bin/
wget https://getcomposer.org/installer
php installer
rm -f installer
php-cli ./composer.phar global require drush/drush:6.*
Add the following to .bashrc
alias php="php -d disable_functions="
alias composer="php-cli ~/bin/composer.phar"
alias drush="~/.composer/vendor/bin/drush"
Get it to reload .bashrc
source ~/.bashrc
Remarks and questions
First off, excellent tutorial, I found it very helpful to set up Drush on SiteGround. Note: SiteGround already offers Drush installed, but I wanted to control my own version, so I followed these instructions (and all comments). I have drush 6.2 installed in ~/bin/drush. I've added this directory to my path and since SiteGround offers an environment variable DRUSH_PHP pointing to the php-cli location, I've created an alias
alias drush="$DRUSH_PHP ~/bin/drush/drush"
.Remarks: some comments refer to step 14 and 15, but these are no longer available. It would be nice if there was some indication of what they were originally, so readers are not left wondering if there are steps missing.
Questions:
drush @remote-site status
, which basically repeats my manual action, I still need to provide the path to php-cli and the full path to the drush installation in the site-alias configuration. I would assume that the SSH command would pick up the contents of .bashrc, but apparently not. Does it pick up any such config file? If yes, which one?drush status
-> correct status output~/bin/drush/drush status
(bypassing the alias) -> 'no tput' message and correct status outputdrush pm-update
-> error (see below)~/bin/drush/drush pm-update
-> 'no tput' message and correct messageTo add to the confusion: if I do both drush commands from my local machine, using the remote site alias, both work as intended, i.e.
drush @remote status
anddrush @remote pm-update
both give the correct output.Any idea how to solve this?
Error:
Following up
If a comment is referencing a step that no longer has the same number, you can view an old copy of the document. Make not eof the date of the comment, then click "revisions" at the top of the page. Choose the date that precedes the comment.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Updated documentation
I've created a new documentation page for Drush 6 and 7 via Composer here.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Kudos on good writing
This is the best written set of instructions I've seen. Thanks for being so thorough. Worked like a charm, AND I didn't founder between steps to try and match my experience to the description. Useful clues for n00bs, too, that I wish I'd seen years ago.