H5P Guides

Set up H5P for Drupal 7

Download and install Drupal

Skip this step if you already have a running Drupal 7 installation.

Install the H5P module

1. Find the latest H5P module from the H5P project page on drupal.org.

2. Install the H5P module as you usually install a Drupal module. If you are new to Drupal modules, you can take a look at Drupal's installing modules guide.


3. Navigate to your site's module administration pages (/admin/modules/). Scroll to the section named "Other" and enable the "H5P" and "H5P Editor" modules.

Install content types

Now your module is set up, and you can start creating H5P Content. After you click on "Add new" The H5P Hub will load - offering you a variety of content types to pick from. 
Below you can see how to get new content types from the H5P Hub. 

Here you can find Tutorials how to create content using different content types.

Roles and permissions

Depending on the framework used, access to H5P features may be controlled by defining the permissions for roles or users.

In Drupal, H5P has the following permissions available. They should be assigned users/roles as shown.

 content writersite editorsite administrator
create h5pYesYesYes
edit own h5pYesYesYes
delete own h5pYesYesYes
edit any h5pNoYesYes
delete any h5pNoYesYes
update h5p librariesNoMaybe*Yes
access all H5P resultsNoYesYes
Access own H5P resultsYesYesYes
Access h5p results for own contentYesYesYes
Create restricted H5P content typesMaybe**Maybe**Yes

* The "update h5p libraries" permissions enables the user to upload H5Ps with updated library versions. Whether or not editors should have this access is up to site policy.

Updating old content to new versions can change their appearance and functionality significantly, preserving old content through library upgrades is always one of the main focuses of a library developer. Be aware of possible versioning and content upgrades issues when letting users upload altered H5P libraries.

** The "Create restricted H5P content types" permissions enables the user to create content types that users without this permission aren't allowed to create. Admins can configure what content types are restricted at admin/content/h5p. Who should have this access is up to the site policy.

Enable H5P shortcodes

The H5P module for Drupal includes an input filter allowing authors to insert shortcodes like this:

where 123 is the node id. To use these shortcodes this filter must be enabled:

  1. Go to admin/config/content/formats
  2. Click on configure for the textformat you want to enable H5P shortcodes for
  3. Enable the "H5P Content" filter, and make sure it is last in the list of enabled filters
  4. Click "Save configuration"

By doing this the H5P shortcodes should be possible to use for all authors who have access to this text format. Do note that the H5P filter disables caching for text formats using it. With page caching or similar turned on this shouldn't be noticeable.

Enable result reports

By enabling Drupal's Views module a view will appear as a tab on each H5P node and on each user profile displaying basic result data.

Compatibility problems with httprl module 

Users have reported problems enabling the H5P HUB on sites using the httprl module. More info here.