Installing Datawrapper

Gregor Aisch edited this page Jun 20, 2018 · 11 revisions

This is how you can install Datawrapper on your own server. Please also see these alternative setup instructions

Prerequisites

  • Apache or nginx
  • PHP > 7
  • MySQL

Note that Datawrapper is designed to run on its own domain, so running it inside a sub-directory (e.g. http://localhost/datawrapper) won't work.

Basic setup

  1. Clone the Datawrapper repository to your server or download and unpack the repository as ZIP file.
  2. If Composer is not installed on your server, download and install it into the Datawrapper directory using curl -sS https://getcomposer.org/installer | php.
  3. Run php composer.phar install and grunt to download third-party libraries used by Datawrapper.
  4. Configure a new domain for your Datawrapper instance, for instance by adding a virtual host in your Apache config (e.g. http://datawrapper.local). The domain must point to /www in the Datawrapper repository. Make sure to also add the new domain to your hosts file.
  5. Configure a second virtual host for the Datawrapper charts, which are designed to be hosted separately from Datawrapper. You can setup the hostname http://chart.datawrapper.local and point it to /charts/static. Later you can reach your local charts at http://chart.datawrapper.local/chart_id/.
  6. Create the configuration file by copying config.yaml.template to config.yaml, edit the file, and change domain and chart_domain and the email addresses.
  7. Make sure the web server process has write access to the following directories:
  • charts/static
  • charts/data
  • charts/data/tmp
  • charts/images
  • vendor/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer
  1. Create a new MySQL database. Initialize the table schema using /lib/core/build/sql/schema.sql.
  2. Copy lib/core/build/conf/datawrapper-conf.php.master to lib/core/build/conf/datawrapper-conf.php and update your database settings (dbname, user, password) according to your server configuration.
  3. Install the core plugins by running php scripts/plugin.php install "*".
  4. Open the Datawrapper domain in a web browser. You should now see something like "You have successfully installed Datawrapper.".
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.