📋 Table of Contents
Hostinger Account & Hosting Setup
1.1 Verify PHP Version Required
Moodle 4.x requires PHP 8.1 or higher. Set this in Hostinger hPanel.
- Log in to hPanel → go to Hosting → Manage
- Click Advanced → PHP Configuration
- Select PHP 8.1 or 8.2 from the dropdown
- 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:
1.3 Set Up Your Domain / Subdomain
Decide where Moodle will live. Two common options:
| Option | URL Example | When to Use |
|---|---|---|
| Subdirectory | yourdomain.com/moodle | Landing page at root, Moodle in subfolder ✅ Recommended |
| Subdomain | learn.yourdomain.com | Dedicated learning URL, cleaner separation |
This guide uses the subdirectory approach: landing page at yourdomain.com, Moodle at yourdomain.com/moodle.
Database Creation
2.1 Create the Database Critical
- In hPanel, go to Databases → MySQL Databases
- Under Create New Database, enter a name e.g.
learnhub_db - Click Create
- Under Create New User, enter username
learnhub_userand a strong password - Under Add User to Database, select both and grant All Privileges
- 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:
Expected: charset = utf8mb4, collation = utf8mb4_unicode_ci
Download & Upload Moodle
3.1 Download Moodle
- Go to download.moodle.org
- Download the latest stable .zip package (e.g. Moodle 4.3)
- Extract the ZIP — you'll get a folder named
moodle
3.2 Upload via File Manager Easiest
- In hPanel → Files → File Manager
- Navigate to
public_html/ - Click Upload Files → upload the
moodlefolder (or upload the ZIP and extract there) - Result:
public_html/moodle/should containindex.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.
- In File Manager, navigate up one level from
public_html - Create a new folder named
moodledata - Full path:
/home/u123456789/moodledata/(your home dir) - 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
Moodle Web Installer
4.1 Run the Installer
- Open your browser and go to:
https://yourdomain.com/moodle - The installer will start automatically
- Select language: English (or your preferred language) → Next
4.2 Confirm Paths
| Field | Value to Enter |
|---|---|
| Web address | https://yourdomain.com/moodle |
| Moodle directory | /home/u123456789/public_html/moodle |
| Data directory | /home/u123456789/moodledata |
4.3 Database Settings Use Your Credentials
| Field | Value |
|---|---|
| Database type | MariaDB / MySQL (improved) |
| Database server | localhost |
| Database name | learnhub_db |
| Database user | learnhub_user |
| Database password | Your strong password |
| Tables prefix | mdl_ |
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
- Accept the license and click Continue
- Moodle installs ~300 database tables — this takes 2–5 minutes
- Create your Admin account: fill in username, password, email
- Set Site Name: e.g. LearnHub
- Click Save Changes — installation complete! 🎉
Install Landing Page
5.1 Upload index.html
- In File Manager, navigate to
public_html/ - Upload
landing/index.htmlfrom this package - The file should sit at
public_html/index.html - 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
LearnHuband replace with your name - Course cards — update titles, prices (₱), and emoji icons
- Stats — update learner count and course count
- Colors — edit
--tealand--goldCSS variables in:root - CTA links — all links point to
/moodle/— update if you used a subdomain
Install LearnHub Theme
6.1 Upload Theme Files
- Rename the
moodle-theme/mytheme/folder tolearnhub - In File Manager, navigate to
public_html/moodle/theme/ - Upload the entire
learnhub/folder there - Result:
public_html/moodle/theme/learnhub/config.phpshould exist
6.2 Activate the Theme in Moodle Admin
- Log in to Moodle as admin → Site Administration
- Go to Appearance → Themes → Theme Selector
- Click Change theme for Default theme
- Find LearnHub in the list and click Use theme
- 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.
Create Your First Course
7.1 Create a New Course
- In Moodle Admin → Courses → Add a New Course
- Fill in the Course full name (e.g. "Full-Stack Web Development")
- Set Short name (e.g.
FSWD101) - Set Category (create one if needed: Site Admin → Courses → Manage categories)
- Set Course format to Topics format
- Set Number of sections to 8 (one per module)
7.2 Recommended Module Structure (Template)
Use this structure for every course you create:
| Section | Name | Suggested Activities |
|---|---|---|
| 0 | Course Introduction | Forum: Welcome, Page: Course Overview, File: Syllabus PDF |
| 1 | Module 1 — Foundations | Video (URL/File), Page: Reading, Quiz: Knowledge Check |
| 2 | Module 2 — Core Concepts | Video, Assignment: Practice Exercise |
| 3–6 | Modules 3–6 | Repeat pattern above |
| 7 | Final Assessment | Quiz: Final Exam, Assignment: Final Project |
| 8 | Resources & Community | Forum: Discussion, URL: External Links |
7.3 Enable Course Completion & Certificate
- In Course Settings → Completion tracking: Enabled
- Add a Certificate activity (install plugin: mod_certificate or use Custom Certificate)
- Set the certificate to issue when: Course is marked complete
Install the Custom Certificate plugin from moodle.org/plugins for beautiful, brandable certificates.
Post-Install Configuration
8.1 Enable HTTPS / SSL
- In Hostinger hPanel → SSL → Install SSL (free Let's Encrypt)
- In Moodle: Site Admin → General → HTTP Security
- Enable Use HTTPS for logins
- Update
config.php— set$CFG->wwwroottohttps://
8.2 Configure Cron Job (Critical!)
Moodle needs cron to run every minute for emails, completions, etc.
- hPanel → Advanced → Cron Jobs
- Add new cron with schedule:
* * * * *(every minute) - Command:
8.3 Email / SMTP Setup
- Site Admin → Server → Email → Outgoing mail config
- Set SMTP host (use Hostinger's SMTP or an external like Mailgun/SendGrid)
- 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)