Deployment Guide · Hostinger · Moodle LMS

LearnHub Setup
Step-by-Step Guide

Complete instructions for deploying Moodle LMS on Hostinger shared hosting, configuring the database, uploading your custom theme, and going live.

✓ Hostinger Business / Premium Plan ✓ PHP 8.1+ ✓ MySQL 8.0+ ✓ 2GB+ Storage ~60 min total

📋 Table of Contents

  1. Phase 1 — Hostinger Account & Hosting Setup
  2. Phase 2 — Database Creation
  3. Phase 3 — Download & Upload Moodle
  4. Phase 4 — Moodle Web Installer
  5. Phase 5 — Install Landing Page
  6. Phase 6 — Install LearnHub Theme
  7. Phase 7 — Create Your First Course
  8. Phase 8 — Post-Install Configuration
1

Hostinger Account & Hosting Setup

Verify your plan meets Moodle requirements

1.1 Verify PHP Version Required

Moodle 4.x requires PHP 8.1 or higher. Set this in Hostinger hPanel.

  1. Log in to hPanel → go to Hosting → Manage
  2. Click Advanced → PHP Configuration
  3. Select PHP 8.1 or 8.2 from the dropdown
  4. Click Save
ℹ️

Moodle 4.3+ works best with PHP 8.1. Avoid PHP 8.3 for now as some plugins may not be compatible yet.

1.2 Configure PHP Settings

In PHP Configuration → php.ini editor, ensure these minimum values:

; Minimum Moodle PHP requirements memory_limit = 256M post_max_size = 128M upload_max_filesize = 128M max_execution_time = 300 max_input_vars = 5000

1.3 Set Up Your Domain / Subdomain

Decide where Moodle will live. Two common options:

OptionURL ExampleWhen to Use
Subdirectoryyourdomain.com/moodleLanding page at root, Moodle in subfolder ✅ Recommended
Subdomainlearn.yourdomain.comDedicated learning URL, cleaner separation
💡

This guide uses the subdirectory approach: landing page at yourdomain.com, Moodle at yourdomain.com/moodle.

2

Database Creation

Create MySQL database via Hostinger hPanel

2.1 Create the Database Critical

  1. In hPanel, go to Databases → MySQL Databases
  2. Under Create New Database, enter a name e.g. learnhub_db
  3. Click Create
  4. Under Create New User, enter username learnhub_user and a strong password
  5. Under Add User to Database, select both and grant All Privileges
  6. Click Add
⚠️

Save your credentials! You'll need: DB Name, DB User, DB Password, and DB Host (usually localhost) during Moodle installation.

2.2 Verify via phpMyAdmin (Optional)

In hPanel → Databases → phpMyAdmin, run the following to confirm setup:

-- Run in phpMyAdmin SQL tab SELECT schema_name, default_character_set_name, default_collation_name FROM information_schema.schemata WHERE schema_name = 'learnhub_db';

Expected: charset = utf8mb4, collation = utf8mb4_unicode_ci

3

Download & Upload Moodle

Get Moodle files onto your Hostinger server

3.1 Download Moodle

  1. Go to download.moodle.org
  2. Download the latest stable .zip package (e.g. Moodle 4.3)
  3. Extract the ZIP — you'll get a folder named moodle

3.2 Upload via File Manager Easiest

  1. In hPanel → Files → File Manager
  2. Navigate to public_html/
  3. Click Upload Files → upload the moodle folder (or upload the ZIP and extract there)
  4. Result: public_html/moodle/ should contain index.php, config-dist.php, etc.

3.3 Create the Moodle Data Directory

Moodle needs a writable directory outside the web root for storing uploaded files.

  1. In File Manager, navigate up one level from public_html
  2. Create a new folder named moodledata
  3. Full path: /home/u123456789/moodledata/ (your home dir)
  4. Set permissions to 755 (right-click → Permissions)
🚫

Do NOT put moodledata inside public_html — it must be outside the web root for security.

3.4 Set Folder Permissions

# If you have SSH access (Hostinger Business+) chmod -R 755 ~/public_html/moodle chmod -R 777 ~/moodledata
4

Moodle Web Installer

Run the browser-based installation wizard

4.1 Run the Installer

  1. Open your browser and go to: https://yourdomain.com/moodle
  2. The installer will start automatically
  3. Select language: English (or your preferred language) → Next

4.2 Confirm Paths

FieldValue to Enter
Web addresshttps://yourdomain.com/moodle
Moodle directory/home/u123456789/public_html/moodle
Data directory/home/u123456789/moodledata

4.3 Database Settings Use Your Credentials

FieldValue
Database typeMariaDB / MySQL (improved)
Database serverlocalhost
Database namelearnhub_db
Database userlearnhub_user
Database passwordYour strong password
Tables prefixmdl_

4.4 Server Checks

Moodle will show a requirements check page. All items should show ✅ OK. Common issues:

  • max_input_vars — fix in php.ini: set to 5000
  • OPcache — enable in PHP extensions if shown as recommended
  • ⚠️ Warnings (yellow) are OK to proceed through; Errors (red) must be fixed

4.5 Install & Create Admin Account

  1. Accept the license and click Continue
  2. Moodle installs ~300 database tables — this takes 2–5 minutes
  3. Create your Admin account: fill in username, password, email
  4. Set Site Name: e.g. LearnHub
  5. Click Save Changes — installation complete! 🎉
5

Install Landing Page

Place the LearnHub landing page at your domain root

5.1 Upload index.html

  1. In File Manager, navigate to public_html/
  2. Upload landing/index.html from this package
  3. The file should sit at public_html/index.html
  4. Visit https://yourdomain.com — your landing page should appear
💡

Edit the landing page's text, course names, and prices in any text editor before uploading. Search for LearnHub and replace with your actual school/platform name.

5.2 Customize the Landing Page

Key items to personalize in index.html:

  • Site name — find LearnHub and replace with your name
  • Course cards — update titles, prices (₱), and emoji icons
  • Stats — update learner count and course count
  • Colors — edit --teal and --gold CSS variables in :root
  • CTA links — all links point to /moodle/ — update if you used a subdomain
6

Install LearnHub Theme

Apply the custom Moodle theme via admin panel

6.1 Upload Theme Files

  1. Rename the moodle-theme/mytheme/ folder to learnhub
  2. In File Manager, navigate to public_html/moodle/theme/
  3. Upload the entire learnhub/ folder there
  4. Result: public_html/moodle/theme/learnhub/config.php should exist

6.2 Activate the Theme in Moodle Admin

  1. Log in to Moodle as admin → Site Administration
  2. Go to Appearance → Themes → Theme Selector
  3. Click Change theme for Default theme
  4. Find LearnHub in the list and click Use theme
  5. Confirm — the site will reload with the new look
⚠️

If LearnHub doesn't appear: go to Site Administration → Notifications — Moodle will detect and install it. Then revisit Theme Selector.

7

Create Your First Course

Build a course using the ready-made template structure

7.1 Create a New Course

  1. In Moodle Admin → Courses → Add a New Course
  2. Fill in the Course full name (e.g. "Full-Stack Web Development")
  3. Set Short name (e.g. FSWD101)
  4. Set Category (create one if needed: Site Admin → Courses → Manage categories)
  5. Set Course format to Topics format
  6. Set Number of sections to 8 (one per module)

7.2 Recommended Module Structure (Template)

Use this structure for every course you create:

SectionNameSuggested Activities
0Course IntroductionForum: Welcome, Page: Course Overview, File: Syllabus PDF
1Module 1 — FoundationsVideo (URL/File), Page: Reading, Quiz: Knowledge Check
2Module 2 — Core ConceptsVideo, Assignment: Practice Exercise
3–6Modules 3–6Repeat pattern above
7Final AssessmentQuiz: Final Exam, Assignment: Final Project
8Resources & CommunityForum: Discussion, URL: External Links

7.3 Enable Course Completion & Certificate

  1. In Course Settings → Completion tracking: Enabled
  2. Add a Certificate activity (install plugin: mod_certificate or use Custom Certificate)
  3. Set the certificate to issue when: Course is marked complete
💡

Install the Custom Certificate plugin from moodle.org/plugins for beautiful, brandable certificates.

8

Post-Install Configuration

Essential settings for a production-ready LMS

8.1 Enable HTTPS / SSL

  1. In Hostinger hPanel → SSL → Install SSL (free Let's Encrypt)
  2. In Moodle: Site Admin → General → HTTP Security
  3. Enable Use HTTPS for logins
  4. Update config.php — set $CFG->wwwroot to https://

8.2 Configure Cron Job (Critical!)

Moodle needs cron to run every minute for emails, completions, etc.

  1. hPanel → Advanced → Cron Jobs
  2. Add new cron with schedule: * * * * * (every minute)
  3. Command:
php /home/u123456789/public_html/moodle/admin/cli/cron.php

8.3 Email / SMTP Setup

  1. Site Admin → Server → Email → Outgoing mail config
  2. Set SMTP host (use Hostinger's SMTP or an external like Mailgun/SendGrid)
  3. Send a test email to confirm delivery

8.4 Final Checklist

  • SSL certificate installed and HTTPS enforced
  • Cron job configured and running
  • Outgoing email tested successfully
  • LearnHub theme active
  • Landing page live at domain root
  • First course created with all sections
  • Admin password changed from default
  • Self-enrollment enabled on courses
  • Moodle notifications cleared (Site Admin → Notifications)
  • Mobile app access tested (Moodle app)