Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How Do I Install Magento on Dreamhost
 
Reno SEO
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2008-02-15
 

I saw that other articles were dead, or out-dated, so I just wrote this article detailing (probably too much) the process of installing and tweaking Magento to run on Dreamhost. It should be able to be followed by beginners. Hopefully someone finds it useful. I’m open to any feedback.

Installing Magento on Dreamhost

-Nick

 
Magento Community Magento Community
Magento Community
Magento Community
 
RoyRubin
Enthusiast
 
Avatar
Total Posts:  968
Joined:  2007-08-07
Los Angeles, CA
 

Excellent post - thanks for sharing.

BTW - all of our signature links have a rel="nofollow" attribute, FYI.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  252
Joined:  2007-08-31
 

also that ‘dreamhost hosting’ in your sig seems like an affiliate link. pretty sure thats not allowed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reno SEO
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2008-02-15
 

My bad, I’ll remove it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
calvinh
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2009-05-21
SoCal
 

Unfortunately, that article has become a wee bit outdated and no longer applies to the latest release of Magento (1.3.1.1). But if anyone else out there is struggling with installing Magento on Dreamhost, maybe this will save them some time and anguish.

The problem I kept running into no matter which installation method I tried was that, after I filled out my database login credentials and proceeded with the setup, I would get an Internal Server Error. This happens whether you use the downloader install, the full install, or install over SSH. Once you fill out the first form of the web interface, the setup process inevitably fails. My best guess is that the install.php script takes too long to execute, exceeding PHP’s max execution time. Why this works on some servers (like my WAMP stack at home) but not on other? I don’t know.

Luckily, the fix is very simple--just don’t use the web interface. The Magento Team has written a very clear and concise guide on how to finish the second half of the install right from the command-line. I’ve modified the first line of script to work with Dreamhost’s PHP5 install path:

/usr/local/php5/bin/php -f install.php -- \
--license_agreement_accepted "yes" \
--locale "en_US" \
--timezone "America/Los_Angeles" \
--default_currency "USD" \
--db_host "mysql.yourdomain.com" \
--db_name "your database" \
--db_user "your db username" \
--db_pass "your db password" \
--db_prefix "mag_" \
--admin_frontname "admin" \
--url "http://yourdomain.com" \
--use_rewrites "yes" \
--use_secure "no" \
--secure_base_url "" \
--use_secure_admin "no" \
--admin_firstname "your firstname" \
--admin_lastname "your lastname" \
--admin_email "you@yourdomain.com" \
--admin_username "admin" \
--admin_password "password"

To do the entire install over SSH…
1. First, follow the SSH installation instructions.
2. Then, follow the CLI installation wizard instructions (using /usr/local/php5/bin/php as the php path as shown above).

That’s it. And don’t worry if the CLI command takes a long time to complete. That’s normal--and why the web installation wizard doesn’t work.

An alternative method that I haven’t tried personally, but should work in theory, is to edit php.ini (PHP’s configuration file). Here’s a guide on Dreamhost’s Community Wiki on how to do just that. However, it’s a more advanced technique that requires a bit more technical knowledge, though it would let you finish the install using the web interface.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanok
Jr. Member
 
Total Posts:  6
Joined:  2009-05-23
 

Hi,

I followed the instructions but received this after entering the CLI command:

Could not open input file: install.php

Thanks in advance for your help. I’m in a bit over my head on this one.

 
Magento Community Magento Community
Magento Community
Magento Community
 
calvinh
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2009-05-21
SoCal
 

ryanok:
What directory did you try to run the CLI command in? You have to be in the same directory as install.php (~/yourdomain.com/ for root installs, or ~/yourdomain.com/subdir/ for subdirectory installs). If, when you type ls, you don’t see install.php amongst the files listed, then you’re not in the right directory (or you did not perform the first half of the installation correctly).

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanok
Jr. Member
 
Total Posts:  6
Joined:  2009-05-23
 

when I type Is, I just get

-bash: Is: command not found

I redid the first part of the installation but I still get the same error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
calvinh
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2009-05-21
SoCal
 

ls is L-S, not I-S. It’s a basic *nix command to list all files in the current directory. The command should be recognized by any Linux or Unix system.

Try typing pwd in your SSH window. pwd (Print Working Directory) is the command to see what directory you’re currently in. If you are doing a root directory install, then the output should be something like:

/home/username/yourdomain.com
(where username is your dreamhost username)

If you’re doing a subdirectory install, then you should see something like:

/home/username/yourdomain.com/subdir
(where subdir is the directory you installed Magento under)

If you’re not in the right directory then you need to cd (Change Directory) to the correct directory. For example, let’s say I installed Magento in /home/calvin/mystore.com/store, but I am not in the right directory. Here’s what I would do:

First, I’d type pwd to find out what directory I’m in ("[iecman]$" is just my bash prompt):

[iceman]pwd
/home/calvin
Ok, so now I know that I’m in /home/calvin. Let’s see what files/folders are in this directory:
[iceman]ls
Maildir
Makefile
dh
logs
mail
somedomain
.com
blog
.somedomain.com
mystore
.com
Ah-ha--mystore.com! That’s the domain I installed Magento under. So let’s change directories to mystore.com:
[iceman]cd mystore.com
[iceman]
pwd
/home/calvin/mystore.com
Ok, we’re almost there. We just need to cd to the subdirectory where Magento is installed:
[iceman]cd store
[iceman]
pwd
/home/calvin/mystore.com/store
Alright, now to make sure that install.php is in this folder, we’ll list all the php files in the directory.
[iceman]ls *.php
cron
.php  index.php  install.php
There it is! Now I can type in the CLI command from the correct working directory.

Of course, I could have also just typed:

cd ~/mystore.com/subdir
which would have taken me to /home/calvin/mystore.com/subdir directly. But if you don’t know, or aren’t sure of, the exact path that Magento is installed in, then you will need to browse for it as demonstrated above.
 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanok
Jr. Member
 
Total Posts:  6
Joined:  2009-05-23
 

Thank you for your help. Something must be going wrong with the first part of the install because when I use the ls command in the correct subdirectory, I get this:

[dillinger]$ ls *.php
cron.php index.php

Back to the tinkering…

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanok
Jr. Member
 
Total Posts:  6
Joined:  2009-05-23
 

success! a little tinkering was all that was needed. thanks again for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
calvinh
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2009-05-21
SoCal
 

Good to hear. So the CLI command worked for you then? Or did you have to try a different method?

 
Magento Community Magento Community
Magento Community
Magento Community
 
developer0
Jr. Member
 
Total Posts:  6
Joined:  2009-07-01
 

Thanks Nick et al - This can be a very frustrating process. I tried various methods, all of them failed.

In the end I used the SSH ‘install’ method (http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_ssh) to upload the files.

Then ran the web based install.

I couldn’t get the CLI install script to work - probably just something I did wrong - but the normal web based install method worked fine once I had SSH’d the files up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
B3tw33n
Jr. Member
 
Total Posts:  10
Joined:  2009-09-14
 

Thank you for these instructions. They are very well written. Unfortunately for me the CLI command isn’t working for me.  i ran my installers via ssh. the web-based installer wouldn’t work for me because i’m caught in a redirect loop. ugh. i tried running your CLI command to finish the install, but nothing. i don’t get any messages in the command line saying successfully installed.  if i go to my site i just get the same redirect loop error. 

my site at: http://www.mimilou-shop.fr/

I have all the versions, all the extensions according to magento-check.php.

dreamhost hath foresaken me!

help?

james

 
Magento Community Magento Community
Magento Community
Magento Community
 
calvinh
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2009-05-21
SoCal
 

This reply is probably too late for B3tw33n, but the CLI install script does take a bit of time to process; so it might not look like anything is happening for a while. But it’s not anything ridiculous like an hour (on Dreamhost, at least).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top