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

Gravity PDF


Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using the popular form-builder plugin, Gravity Forms (affiliate link). Find out more about Gravity PDF at


This Git repository is for developers who want to contribute to Gravity PDF. Don't use it in production. For production use, download Gravity PDF from the WordPress Plugin Directory.

The development branch is considered our bleeding edge branch, with all new changes pushed to it. The master branch is our latest stable version of Gravity PDF.



Setup for Docker

The Docker setup will create a fully functional development environment preconfigured for Gravity PDF.

  1. Clone the repository using git clone from the terminal
  2. Copy and rename .env.example to .env, then replace 00000000000000000000000000000000 with a valid Gravity Forms license key
  3. Run yarn && yarn build:production
  4. Start Docker and then run yarn env:install to setup the local development environment
  5. Access a local development site at http://localhost:8888 with the login admin and password.

If you shut down Docker and want to fire up the environment later, use yarn wp-env start. You can reset the database back to its original state with yarn wp-env clean all. When all else fails, delete everything and start again with yarn wp-env destroy.

See the WordPress Developer Handbook for more details about managing the docker environment.

Enable X-Debug

X-Debug is enabled by default for step debugging and profiling. If you need to use other X-Debug modes you can manually start the environment and pass the appropriate modes in: yarn wp-env start --xdebug=profile,trace,debug.

**Note: there is currently an issue that prevents running X-Debug for the PHPUnit/CLI.

Switch PHP Versions

The default version that will be configured is PHP8.0. If you want to change this you can adjust the phpVersion value in the .wp-env.json file and then stop and start the environment with yarn wp-env start.

Setup without Docker

If you would rather use your own development environment, you can build Gravity PDF using the following commands.

  1. Clone the repository using git clone
  2. Run yarn && yarn build:production
  3. Run composer install
  4. Run composer run prefix

Building JavaScript

If you are making changes to any of the JavaScript or CSS, run yarn build:dev to ensure the files automatically gets built when you make changes on the file system.


To lint your JS code use yarn lint:js, and to try automatically fix it use yarn lint:js:fix.

To lint your PHP code, use composer lint, and to try automatically fix it use composer format.

Automated Tests

The automated test suite can only be run using Docker.


Useful commands include:

yarn test:e2e
yarn test:e2e:headless


Run full suite of tests using yarn test:php or yarn test:php:multisite.


The JavaScript unit tests can be run with yarn test:js


All documentation can be found at


Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.



Security policy





No packages published