Skip to content
Switch branches/tags

Latest commit


Git stats


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

SP Schweiz


Demovox (dev readme)

Build Status open bugs WordPress plugin downloads WordPress plugin version WordPress tested version


WordPress plugin demovox is a tool to collect signatures for Swiss popular initiatives by offering the visitor a personalized signature sheet.

This Plugin was developed by the Socialist Party of Switzerland, it was initially built for the popular initiative Prämien-Entlastungs-Initiative in 2019. It has been used for numerous others since, like umverkehR (2020) and AHVx13 (2020) by SGB, to name a few.


  • PHP >= 7.0 (feature "Hashid" requires >= 7.1.3)
  • MySQL >= 5.6.5
  • WordPress >= 4.9
  • SSL certificate for HTTPS (non-https is only allowed for development)
  • Optional feature requires the PHP modules "GMP" or "BC Math"

Productive installation

Simply install the WordPress plugin demovox from within the Plugin manager of your WordPress installation. You can find the admin manual or the prebuilt Zip-File for manual installation on

If this plugin is of help for you, please consider a donation and write a review on the demovox WordPress plugin page.


Please send us a pull request for any improvements on the plugin.


  1. Pull demovox from git
  2. Use the webserver wordpress container from docker-compose.yaml (for development purposes), which includes a WordPress webserver and mailhog for mail testing. Or use your own webserver (see below).
  3. Install required project packages and generate assets with grunt (see below)
  4. Activate the plugin through the 'Plugins' menu in local WordPress
  5. Place shortcodes [demovox_form] on a page or use the automatically generated page
  6. Optionally use and [demovox_count] to show the number of collected signatures and [demovox_optin] for opt-in edit form
  7. Configure the plugin in WordPress admin. Allow non-https access in the advanced settings of the plugin and disable "Redirect clients to secure HTTPS".

Own webserver

You can use your own webserver (see requirements above) and map the demovox directory to [WordPressDir]/wp-content/plugins/demovox.

While developing, you might want to work on a web server without SSL. Enable WP_DEBUG in wp-config.php and you probably want to disable WP_DEBUG_DISPLAY. Then open the Advanced settings of the plugin in the WordPress backend and disable "Redirect clients to secure HTTPS".

Building assets

Docker container

Start buildserver from docker/docker-compose.yaml. The plugin is monted in /var/demovox/

Manual installation (instead of docker container)

If you don't want to use the docker container, install the following build dependencies: Python, Ruby, node.js (use v8.10.0 as po2mo fails with higher versions), composer, gettext. Install required NPM packages with npm install grunt-cli sass -g

Install required project packages

Go to demovox directory (e.g. cd /var/demovox/)

npm install
composer install --no-dev

Install required packages for tests:

composer install
bin/  <db-name> <db-user> <db-pass> [db-host]

Grunt Commands

Generate assets for development

Generate minified JS and CSS files and compile .mo translation files:

grunt buildAssets
Build for repo

Build plugin snapshot in demovox/buildWpOrg which can be uploaded to the repository:

grunt buildWpOrg
Running the tests

There are just a few PHPUnit tests available yet, feel free to contribute some and send a pull-request to increase the test coverage.

grunt test
Other commands

Build plugin snapshot as ZIP in demovox/, which can be uploaded to a remote WordPress installation:

grunt buildZip

Show all other available commands:

grunt availabletasks


See README.txt and commit log.


See also the list of contributors who participated in this project. Thanks to @dbu for code review.


This project is licensed under the GPLv3 License - see the LICENSE.txt file for details.


demovox is a tool to collect signatures for Swiss popular initiatives by offering the visitor a personalized signature sheet.




No packages published

Contributors 4