Using Moodle on XAMPP – What’s the Path to PHP CLI

While trying to use the H5P activity in new Moodle environment for the first time, I came across the problem that there were no content types were installed. By default Moodle core includes a schedule task to Download available H5P content types from h5p.org. However, since I was running the Moodle in a local environment based on XAMPP, so it was not working.

Looking around Moodle documentation, I understood that to install the H5P content types, first the Moodle cron job has to be setup and running. After doing that, I was still not able to run individual tasks in Scheduled Tasks list.

Deep diving further, I understood  that to be able to run individual scheduled tasks via ‘Run now’ links on the scheduled tasks page, there are two conditions which needs to be met:

  • Condition 1: ‘Allow ‘Run now’ for scheduled tasks’ (tool_task | enablerunnow) in Site administration / Security / Site security settings should be enabled
  • Condition 2: ‘Path to PHP CLI’ (pathtophp) in Site administration / Server / System paths should be set.

After enabling the first one, I was stuck up with the PHP CLI Path for XAMPP. So for the help of all Moodle users who are using Moodle with XAMPP, here is the path to PHP CLI which needs to be entered:

C:\xampp\php\php.exe

You can save this as system path and then you can run the scheduled task individually in Moodle. Pl share in the comments below if this post was helpful for you.

Related articles

Are you still paying thousands for Interactive eLearning Software in 2026? And why you shouldn’t…

There are still many instructional designers, elearning content creators...

Moodle Plugins directory now read only – Moodle Marketplace releasing on July 20th

Moodle Plugins directory which has been the backbone of...

Join MoodleMoot Global 2025 in Edinburgh UK from 16-18 September 2025

MoodleMoot Global 2025 will take place from in Edinburgh...

Join MoodleMoot Australia 2024 on 26-27 November 2024 in Melbourne

MoodleMoot Australia 2024 will take place on 26-27 November...

Case Studies