Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PHP Composer E2E Tests WP compatibility PHP compatibility codecov


Contributors: wielebenwirteam, m0rb, flegfleg, chriwen
Donate link:
License: GPLv2 or later
License URI:

CommonsBooking is a plugin for the management and booking of common goods. This plugin provides associations, groups, and individuals with the ability to share items (such as cargo bikes and tools) among users. It is based on the concept of Commons, where resources are shared for the benefit of the community.


Using The WordPress Dashboard

  1. Navigate to the 'Add New' in the plugins dashboard
  2. Search for 'commonsbooking'
  3. Click 'Install Now'
  4. Activate the plugin in the plugins dashboard

Uploading in WordPress Dashboard

  1. Navigate to the 'Add New' in the plugins dashboard
  2. Navigate to the 'Upload' area
  3. Select from your computer
  4. Click 'Install Now'
  5. Activate the plugin in the plugins dashboard

Using FTP

  1. Download
  2. Extract the commonsbooking directory to your computer
  3. Upload the commonsbooking directory to the /wp-content/plugins/ directory
  4. Activate the plugin in the plugins dashboard

Using GitHub (developers only)

  1. Make sure that composer is installed on your system
  2. Navigate into your wp-content/plugins directory
  3. Open a terminal and run git clone
  4. cd into the directory commonsbooking and run composer install

This might fail, if you don't have the PHP extension uopz installed. Try running composer install --no-dev if you just quickly want to test a specific branch without installing the extension.

  1. Activate the plugin in the plugins dashboard


Either through translating WordPress into your native tongue (see the already existing WordPress Plugin Translations) or through developing and testing new versions of the application.


Run plugin

First, we have to install the necessary dependencies and packages, we can do this by using the

npm run start


The most easy way to start hacking WordPress plugins in general (if you have no other development environment set up) is using wp-env. Install it and it's dependencies (mainly Docker) and run this to start the enviroment:

npm run env:start

The provided .wp-env.json should be sufficient for normal development, for details see the documentation of wp-env config. You can create a .wp-env.override.json for a custom configuration you don't want to check in.

For testing, you can activate the kasimir theme via wp cli inside the wp-env docker container:

wp-env run cli wp theme activate kasimir-theme

Test plugin

To test the code you first run the preparation scripts to load the wordpress core and configure database connection via wp-config.php. The following line can vary on your system, use the appropriate credentials, databse port and version of wordpress. The appropriate database port is printed out by npm run env:start:

bash bin/ wordpress root password latest

Testing the plugin code via phpunit. At the moment it works only with a manually downloaded phar. We are using PHPUnit 9 and PHP7.4 for the automated tests. The tests might fail if you are using a different version.

php ~/phpunit.phar --bootstrap tests/bootstrap.php

E2E (end to end) tests are written in cypress. To run them you need to install cypress and start the wordpress environment:

npm run env:start

Now, install the test data needed for the tests:

npm run cypress:setup

Then you can run the tests:

npm run cypress:run

Or open Cypress using

npm run cypress:open

Update translations

Currently, we only manage German and English translations as po files in the repository, so they are available at build time. See the WordPress plugin translation page for other languages available at runtime.

Create a new .pot file using the

wp i18n make-pot . languages/commonsbooking.pot

command in the plugin directory. Make sure that all of your strings use the __ function with the domain commonsbooking. Then you can use poedit to open the commonsbooking-de_DE.po and update the strings from the pot file.

Build plugin zip

To create the plugin zip file for uploading to a development server:



CommonsBooking is an open source Wordpress plugin for sharing items with users. This is the NEW CommonsBooking (starting at version v2.0.0). Please install plugin via Wordpress plugin directory.