Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Installing Moodle on SmarterASP.NET.

Installing Moodle on SmarterASP.NET

From MoodleDocs


Often teachers and administrators want to use Moodle in a live shared web hosting environment instead of a private local computer install. Many hosting companies such as Go Daddy have a one-click install of Moodle. In the case of Go Daddy, they install Moodle 1.9 (as of 2/18/2013) but what if you want to run a later/newer version of Moodle (see below Go Daddy tech support response) or your web hosting company doesn't support Moodle one-click installs? This installation guide will walk you through the steps to install the latest version Moodle on SmarterASP.NET shared web hosting.

Upgrading Existing Moodle Install on Go Daddy shared hosting

  • Here is Go Daddy Tech Support's response to the question on how to upgrade to Moodle 2.4 on their linux shared hosting.
    • "Thank you for contacting Online Support. I understand you need your Moodle upgraded. We are unable to upgrade the Moodle for you and unable to provide exact instructions on how to do it. The upgrade is not done through the hosting control center. You must do the upgrade through the coding of the site itself. Moodle will provide you with instructions on how to upgrade Moodle. Upgrading Moodle" (Go Daddy tech support response by Taylor P. on 2/22/2013)
    • Moodle 2.4 requires MySQL 5.1.33, see Moodle 2.4 release notes
    • as of 10 March 2013, the latest version is MySQL 5.0 on Go Daddy linux shared hosting, see What version of MySQL are you currently running?

Obtain Domain Name

Purchase Web Hosting

  • obtain web hosting account on SmarterASP.NET (if you like this tutorial, please support me by purchasing through my affliliate account)
  • I purchased the .NET Premium shared hosting for $7.95 a month ($95.40 a year)

Configure Domain Name Server (DNS)

DNS on Go Daddy

  • If you purchased your domain from another hosting company, you will need to login to the control panel of that hosting company and have the DNS entry point to the SmarterASP.NET servers, &
    • If your domain was purchased from Go Daddy, here is the steps to set/change the domain name so it points to SmarterASP.NET web hosting
      • login to Go Daddy My Account
      • My Account → Domains → → Launch → Nameservers Set Name Server
      • change nameserver to point to, and
      • config Go Daddy nameserver

DNS on SmarterASP.NET

  • login to SmarterASP.NET control panel add new site in the Hosting Manager → Website Domain Manager → Add New Site
    • Website/Folder Name:
    • Programming Language: PHP
    • might have to rename site5 to, under the Site heading click the pencil paper icon next to site5 to change the name to
      • if you forget to do this, will not be able to rename the site if you have a folder with the same domain name. Here is the work around
        • 1. rename the folder to something different like,
        • 2. change the domain name from site4 in website domain manager to Note, won't be able to do this if a folder of that name already exists.
        • 3. rename back to
    • add domain to site5 by typing under the Mapped Domain column heading and then clicking the Add button.
      • SmarterASP.NET Web Domain Manager

Setup DNS CNAME to

  • note, this might already be done by default.
  • login to SmarterASP.NET control panel, then Hosting Control Panel → DNS Manager → - click Manage button
  • create a CNAME record to which points to
  • SmarterASP.NET CNAME

Setup subdomain

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → DNS Manager
  • select domain name and click Manage button
  • edit CNAME record to and point this to the SmarterASP.NET ftp server IP address

Setup subdomain

Create website directory and moodledata subdirectory

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → Hosting Manager → File Manager → New Folder and recommend giving it the same name as your domain name, i.e. This folder might already exist, created automatically from previous step.
  • create a New Folder under called moodledata. Note that SmarterASP.NET uses Windows Hosting so you cannot change permission like on linux systems using chmod 775
  • Hosting Control Panel → Hosting Manager → File Permission. Can only set edit Read/Write or edit Read-Only. I kept it at the default Read/Write but down the road Moodle complains the moodledata folder is not protected.

Setup FTP account

  • Goal is to create an ftp account to transfer local files to SmarterASP.NET
  • login to SmarterASP.NET control panel
  • Hosting Control Panel → Hosting Manager → FTP Users Manager → Add FTP User. Enter a user name and password.
  • Unable to create a ftp account at the root level with SmarterASP.NET, need to create a subdirectory. Recommend naming the file directory name the same as your domain name, for example

Create MySQL database

  • login to the SmarterASP.NET control panel and navigate to Hosting Control Panel → Database Manager → MySQL Manager → click Create New Database
  • enter a portion of the database name, like moodcur and the fullname will be db_9898fc_moodcur and a password of Abcd1234
  • write down the connection string info (Database Name, Server URL, Login Name and Password) as this will be used when creating the config.php file
  • SmarterASP.NET create MySQL Database

Download Moodle

  • download zip version of moodle, standard package, don't use the windows installer one because this includes Apache, PHP and other server stuff which is not needed on a shared hosting environment.
    • Typically shared hosting companies do not allow remote desktop access (windows) or telnet shell access (linux) to manually download files to the server, so we have to download to your local computer and then upload it to SmarterASP.NET

Upload zip version of Moodle to web hosting

  • Need to use an ftp client such as FileZilla or UltraEdit to upload the zip file into your domain name directory.
  • Do not upload the file into the moodledata subdirectory
  • When you unzip the file, it will create the moodle directory and all the necessary application data.
  • Example, and enter the ftp account info above for the username and password.
  • Then use File Manager of SmarterASP.NET Control Panel to unzip the file.
  • SmarterASP.NET Unzip/Unpack Moodle Installation
    • takes a minute or two to unzip, when done will get a message that says "File Unzipped"

Check PHP Version Installed

  • login to SmarterASP.NET control panel, if not already in it.
  • Hosting Control Panel → Hosting Manager → File Manager → click New File button on the bottom of the screen. Give it a name phpinfo.php
  • click phpinfo.php and click Editor button (default is ANSI editor, can switch to UTF-8). Then type in the below code.
  • create a text file called phpinfo.php and type in the following code. Save and upload file via ftp to the SmarterASP.NET webserver, e.g.




optional - Update PHP version to 5.4.7

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → IIS Manager → PHP Version Manager
  • SmarterASP.NET Upgrade PHP Version

Increase Memory in PHP.ini

  • This will require SmarterASP.NET administrator to edit the php.ini (list of php.ini directives) file to the following recommended limits
  • increase post_max_size from 8M to 128 MB
    • can be set in PHP_INI_PERDIR (php.ini, .htaccess, httpd.conf or .user.ini - think these are only available on linux)
  • increase upload_max_filesize from 2M to 128 MB
    • can be set in PHP_INI_PERDIR (php.ini, .htaccess, httpd.conf or .user.ini- think these are only available on linux)
  • increase memory_limit from 256M to 512 MB
    • can be set anywhere

These recommendations are from Chris Mattias, Moodle 2 Essential Training for Teachers - Chapter 01 - Installing Moodle from

PHP Configuration Settings - Where a configuration setting may be set

  • PHP_INI_USER can be set in user scripts like ini_set() or in .user.ini
  • PHP_INI_PERDIR can be set in php.ini, .htaccess, httpd.conf or .user.ini
  • PHP_INI_SYSTEM can be set in php.ini or httpd.conf
  • PHP_INI_ALL entry can be set anywhere
  • ini_set("post_max_size", "128M");
  • ini_set("upload_max_filesize", "128M");
  • ini_set('memory_limit', '512M');

Create config.php

  • edit the existing and save as config.php in the same directory. I'm using UltraEdit which gives me the ability to edit and automatically save the file on the server, don't have to manually ftp the each time, big time savings.
  • edit lines 41 - 47 with the SmarterASP.NET specific connection string

$CFG->dbtype = 'mysqli'; // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci' $CFG->dblibrary = 'native'; // 'native' only at the moment $CFG->dbhost = ''; // eg 'localhost' or '' or IP $CFG->dbname = 'db_991088_moodcur'; // database name, eg moodle $CFG->dbuser = '991088_moodcur'; // your database username $CFG->dbpass = 'Abcd1234'; // your database password $CFG->prefix = 'mdl_'; // Prefix to use for all table names

  • Other variables must be defined as follows, line 97 for wwwroot, line 113 for dataroot (use SmarterASP.NET File Manager to find the full path to your domain name, in this case it is h:\root\home\jefferyjjensen-001\www\

$CFG->wwwroot = ''; $CFG->dataroot = 'h:\root\home\jefferyjjensen-001\www\\moodledata';

  • it appears wwwroot works with both and, I'm not sure if one is more right/correct than the other.
  • if you type in the wrong path to dataroot, will get an error like this:
    • Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

test connection with MySQL phpMyAdmin

  • login to SmarterASP.NET control panel
  • Hosting Control Panel → Database Manager → MySQL phpMyAdmin. Use the following login creditials
  • Server =
  • Username = 991088_moodcur
  • Password = Abcd1234
    • if getting error number 1045 Cannot log in to the MySQL server, double check your Server name is correct, in my case it was wrong.
    • the database should be blank, that is no tables in it.
      • phpMyAdmin database without tables
    • logout of phpMyAdmin

Moodle Configuration

Installation Agreement

  • Installation - agree to the copyright notice, click the Continue button
    • Moodle Installation Screen on SmarterASP.NET

Installation Server Checks

  • Server checks on Moodle 2.4.1+ build, click the Continue button
  • Moodle Server Checks Installation Screen on SmarterASP.NET
    • might need to notify SmarterASP.NET to enable the following php_extensions
      • soap extension which is useful for web services and some contrib modules
      • Intl extension which is used to improve internationalization support, such as locale aware sorting
      • UPDATE - on 2/21/2013 Ailen, SmarterASP.NET staff member globally enabled the PHP soap and intl extensions, so you shouldn't see any warning messages on the server checks.
  • click the Continue button

Installation Timeout Error

If you get this error, then need to have SmarterASP.NET admins edit the php.ini file and change the max_execution_time from default of 30 to 600 (seconds I believe). When set to 600, I was able to get Moodle to install without getting the HTTP Error 500.0 message.

Installation Plugins Check

  • after the above error message, revisit
  • will get this plugins check screen. It appears the number of plugins varies on how far SmarterASP.NET got on importing the approx 305 MySQL tables.
    • phpMyAdmin showing tables installed on SmarterASP.NET
  • scroll to the bottom of the page and click the Upgrade Moodle database now button
    • Plugins check on SmarterASP.NET

Installation Upgrading to new version

  • will see a list of files that have been installed successfully. Scroll to the bottom and click Continue
    • Upgrading to new version on SmarterASP.NET

Installation Moodle Primary Administrator

This step is creating the primary site administrator. Verify information is correct because this user cannot be removed from the site administrator role. See Site administrators

  • Enter the following
    • General Username (lower case only)
    • Password (at least 8 characters with at least 1 digit, 1 lower case letter, 1 upper case letter and 1 non-alphanumeric character)
    • First name
    • Surname/Family Name
    • Email address
    • City/town
    • Country
    • all the other info is optional
  • click update profile

Installation Front Page Settings

  • Full site name, such as Clark County School District Class Curriculum Home Page
  • Short name: ccsdcurriculum
  • Front page description
  • Self registration - Disable
  • click Save changes button

Installation Complete

  • Moodle Successfully Installed on SmarterASP.NET

Install Troubleshooting

I have experienced problems with the Moodle install timing out. Here is the steps to change the PHP max_execution_time

  • run phpinfo script to see what your hosting provider has set the max_execution_time to. The default max_execution_time is 30, I'm guessing this is 30 seconds. I had to submit a support ticket requesting SmarterASP.NET staff to edit the php.ini (can only be edited by the hosting admin) and increased it to 120. Here is a sample of the phpinfo output showing the increase.
    • phpinfo max_execution_time setting
  • Edit the config.php file and add the following

ini_set('max_execution_time', 120);

Site Registration

See Also

Page Comments

--Jeff Jensen 09:08, 24 February 2013 (WST)