How to use H5P in plain HTML 5,PHP and Mysql?


I would like to use one of the samples in my plain html or plain PHP page with a MySQL backend.
I dont wish to use wordpress or joomla or drupal.
Can this be done ?
Can I call a JS function or a CSS class from within this plain html5 page?

Please keep me informed.


Kovarthanan M

fnoks's picture

It can be done. But, what exactly are you trying to accomplish? Do you need the H5Ps to be editable (using the web browser) on your site?

Yes i need to apply in my site.

fnoks's picture

Sorry, but I do not understand what "apply in my site" means. Do you need the editor on your site?

Yeah, I need editor to my site to create e-learning module.

fnoks's picture

Then you have to implement the platform specific code. You could look at how this is done in the H5P plugin for e.g. wordpress.

I dont want to use any framework. I need to implement H5P using core PHP and HTML 5 alone.

fnoks's picture

That's ok. I'm not saying you need a framework. I am trying to say you could look at the wordpress-implementation, and convert it to "core PHP".

Hi fnoks

Isn't the a general PHP version that isn't specific to any franework?

If so, could you please send some documentation about how to get it up and running on a simple PHP server. I am not a PHP expert - I'm just picking it up so I can see H5P in action.

Many thanks


falcon's picture

Yes, we have a generic PHP library for H5P core and also the H5P editor. However they don't work stand alone. They are plugins for publishing platforms. We don't have documentation for creating new publishing platform plugins yet.

You may try out H5P by pressing the Test Drive link at the front page of


Does anyone know of any progress in this area to get H5P running in core PHP or in any other language like python (flask or django)?

Many thanks

falcon's picture

We're planning to improve our Joomla! integration and also create a plugin for Moodle in the first half of 2015.

Thanks Falcon

The notes on the php general library github page say:


Any interaction with LMS, CMS or other frameworks is done through interfaces. Plattforms needs to implement
the following interfaces in order for the h5p libraries to work:

- TODO: Fill in here

In addition frameworks need to do the following:

- Provide a form for uploading h5p packages.
- Place the uploaded h5p packages in a temporary directory


Is there any chance you could give some more detailed guidance as to what needs to be done to integrate into core php site build. In particular the TODO list.

I'd love to get this up and running on my site as I think this single file portability is a massive win for reusability and the growth of resources available. If only it was easier to incorporate the functionality into a generic PHP or Python web framework.

Thanks to you guys for developing this and providing it freely for us to use.

falcon's picture

We're planning to add a complete set of documentation for creating new platform integrations. I made some small adjustments to the Readme file specifying which interface you need to implement. We're not able to create a full documentation for it at the moment.

This topic is quite old, but I'm interested as well in a plain php version without need to have a wordpress website or other frameworks. Is there any updates about this topic? Thank you!

tim's picture

Hi mungle, unfortunately there isn't any documentation on writing a plain php version of H5P. There has been some discussion on porting H5P to django:

Hopefully the information there will be of some relevance. 

Hi everyone,

Many years after this topic, I'm trying to use some H5P content in a Laravel app. Is there any news regarding documentation or links to examples from wich I can start ? 

Thanks a lot

Thank you for your reply, it was very helpful.

I'm in another problem, I extracted files from the dragndrop.h5p file and trying to implement them into my code but I can't figure out what constructor I have to call to display the drag and drop exercice. I'm currently trying to call first a new DragNBar wich I put in first arg of a new DragnDrop but it's not working. Could you help me find the entry point that calls the rest of the constructors ? 
Thank you very very much.



otacke's picture

Hi Lucthir!

H5P content types need the H5P framework to run. You cannot simply put the JavaScript files somewhere.


Hi Oliver,

I managed to make it work for the image sequencing content type, I adapted an event dispatcher I extracted from the core. But for the Drag and Drop i don't understand what constructor I should call first ...
If you have an idea to guide me it would be perfect !



otacke's picture

The constructor of an H5P content type that's correctly loaded and that has all dependencies in place (!) is always it's machine name, e.g. `H5P.InteractiveVideo(params: any, contentId: number|string, extras?: any)` or in your case that would be `H5P.DragQuestion(params: any, contentId: number|string, extras?: any)`.

Thank you very much for your response, it is really helpful !
I will work from there to make it work in my project