Missing content folder and h5p.json

I've created my own h5p content-type (based on the interactive video) but when I import it, Wordpress tells me that the content-folder and the h5p.json file is missing.

I'm using "h5p pack -r h5p-own-type" command to build, but when I check the content of the created h5p/zip file, there's no h5p.json or content folder added. So I wonder how I can fix this? The "Get help" link doesn't help me that much and I also already checked out that other threads here in the forum without success. Do I need to add something in my library.json or how these files are created?

I also tried to "rebuild" the "h5p-interactive-video" using "h5p pack -r h5p-interactive-video" command, but it also doesn't contain the content folder and h5p.json file. Regarding the h5p.json file I found this page: https://h5p.org/documentation/developers/json-file-definitions

But I wonder if I need to recreate the h5p.json file even when trying to rebuild a standard h5p content type like the h5p-interactive-video and if so, where do I need to place it?

otacke's picture


I assume you're uploading that archive on the H5P Hub which is supposed to be used to H5P content files, not single library files. You'd upload the latter on the H5P library settings page.


No, I only want to create a h5p package I can upload to my Wordpress installation. But Wordpress says that there's no content/content.json and h5p.json file. I don't want publish it on H5P hub for the moment (because it's in development)

otacke's picture

Um, yes.

Where are you trying to upload that file? WordPress will say that when you upload a library file via the H5P Hub (where you'd otherwise create or upload content, WordPress menu "H5P -> Add new") because it expects an H5P content file that needs to contain a content folder, a content.json file and an h5p.json file.

Mere library files need to be uploaded on the H5P library settings page (WordPress menu "H5P -> Libraries").

I was trying to upload the library in "H5P Content > Add New > Upload" (http://some_domain.tld/wp-admin/admin.php?page=h5p_new).

So finally, I've to use "H5P Content > Libraries > Upload Libraries" to get (only) the library uploaded to WordPress (without any content)?

otacke's picture

Yes, that's what I wrote, didn't I? :-)