Installing Moodle 2.x on Dreamhost Shared Hosting


Moodle 2.x on Dreamhost has always been an issue. As of this writing, Dreamhost only provides Moodle 1.9.x as a One Click Install. This is probably because of the more intensive use of RAM and database calls by Moodle 2.x.

However, if you’d like to give Moodle 2.x a try on your Dreamhost shared plan, here how I was able to get it to install without error. Keep in mind that this will only work well for a small number of concurrent users on Dreamhost or as a test site. A shared Dreamhost account is not for production usage.

b Install custom phprc file. In particular a high memory limit (128M or more) is important for Moodle. I’m not sure what the max is that Dreamhost will allow you to use (or get away with):[/b]

here’s the phprc that I used with my Moodle 2.4 beta install
upload_max_filesize = 20M;
post_max_size = 20M;
max_execution_time = 1800;
memory_limit = 256M;
extension =
display_errors = off

b In Dreamhost Panel, make sure domain / sub-domain where Moodle is being installed has correct PHP version. Set to:[/b]

PHP 5.3.x FastCGI
(or highest FastCGI PHP available from DreamHost)

b Install Moodle 2.x via shell access using GIT. This is much better than CVS or uploading from a .ZIP file or TAR.GZ file.[/b]

read Moodle documentation regarding GIT for more info:

a) Specific Version
$ git clone git://
$ cd moodle
$ git branch -a
$ git branch --track MOODLE_23_STABLE origin/MOODLE_23_STABLE
$ git checkout MOODLE_23_STABLE
$ git pull

b) Latest “master” Version of Moodle (in my case this was 2.4 beta)
$ git clone git://
$ cd moodle
$ git pull

b Modify Config setting for Data Files permissions. Dreamhost is not a fan of 777 for permissions (see link below). I was getting error messages during many 2.x install attempts until I made this change!! This is what made it work:[/b]

So modify this setting from suggested setting in config-dist.php (or in the browser based setup wizard):
$CFG->directorypermissions = 02777;

To better setting for Dreamhost in config-dist.php:
$CFG->directorypermissions = 00750;

b Complete install normally, including MySql database setup, creation of MoodleData folder, etc.[/b]

SUMMARY: This should result in a usable test site (non-production site) or single teacher site for Moodle 2.x on Dreamhost. I doubt this site could handle a large number of concurrent connections on Dreamhost’s shared hosting, and may throw the occasional error if hit by many students at once. If you need a “production” Moodle site on Dreamhost, you would need a Dreamhost VPS or some other plan that provides more RAM and more room for the higher Moodle hardware requirements from version 1.9.x to version 2.x.