Roots Discourse

Best Practice: Adding Gravity Forms (and other plugins)

I ended up using this installer instead:
which also supports installing Gravity Forms Add-ons!

1 Like

Folks, I’ve been experimenting with satispress
It turns an ordinary WordPress installation into a composer repository specifically for plugins and themes.
Nicely protected so you need an auth.json file for credentials. But is working great for me.
I manage my satispress installation in wpmanage as an ordinary WordPress site. So I use that to update almost 50 premium plugins and themes used in various projects.
It does mean using a site license for many of them so they’ll update, but if you don’t need the license for actually running the plugin in a project (or you have multi site licenses), then that’s fine.


This looks really useful, thanks…

@mikelittle I’m looking at setting this up right now. So it seems like for this to work the plugins have to be updated via the WordPress plugin update process? How are you handling authentication for things like CI/CD?

Yes. You can use whatever normal means to update the plugins. I happen to use ManageWP to remotely update a ton of sites I host. So the Satispress site is just part of the routine. But I am really considering just running a shell script to just update them every few hours.

Then the projects that use the commercial plugins can pull them in as and when I update them via composer update

As for authentication, I have set up a different account on the SatisPress site for each project. Then for each account I have generated different API keys (e.g. one for production, one for my local development, one for a remote designer, etc) Those credentials go into auth.json in each checked out copy of the project. The auth.json is git-ignored so the credentials don’t go in the repo. You can also add authentication to you CI/CD stack too. I’m not currently using this on any project with CI/CD set up.
Splitting the auth this way means I can for example revoke the api key from the remote designer when she stops working on the project.

Hope that helps.

Stay safe and healthy


This is still the best GF installation method for me, but an error has occurred on multiple websites lately, something like:
gf is not a recognised command

I solved this by using the deploy_finalize_after hooks instead, e.g.:

  - "{{ playbook_dir }}/roles/deploy/hooks/finalize-after.yml"
  - "{{ playbook_dir }}/deploy-hooks/sites/{{ site }}-finalize-after.yml"

Create the file deploy-hooks/sites/ and add the same hooks provided by runofthemill

This method works great!
I was just wondering how you guys handle the installations in your development environment, since you don’t have any deployments there?

I ended up adding the install commands in a vagrant trigger:

# Installing Gravity Forms plugin & Add-Ons
config.trigger.after [:up] do |trigger| = "Installing Gravity Forms plugin & Add-Ons" = {inline: "bash -c '
    wp @development plugin install gravityformscli --activate &&
    wp @development gf install --activate &&
    wp @development gf tool verify-checksums &&
    wp @development gf install gravityformsuserregistration --activate &&
    wp @development gf install gravityformsmailchimp --activate

but that gives me errors when the plugins are already installed:

==> default: Running trigger...
==> default: Installing Gravity Forms plugin & Add-Ons
    default: Running local: Inline script
    default: bash -c '
    default:         wp @development plugin install gravityformscli --activate &&
    default:         wp @development gf install --activate &&
    default:         wp @development gf tool verify-checksums &&
    default:         wp @development gf install gravityformsuserregistration --activate &&
    default:         wp @development gf install gravityformsmailchimp --activate
    default:       '
    default: Warning: gravityformscli: Plugin already installed.
    default: Activating 'gravityformscli'...
    default: Success: Plugin already installed.
    default: Warning: Plugin 'gravityformscli' is already active.
    default: Installatiepakket downloaden van
    default: Uitpakken van pakket...
    default: De plugin installeren...
    default: Warning: Doelmap bestaat al. "/srv/www/"
    default: Plugin-installatie mislukt.
    default: Warning: The '' plugin could not be found.
    default: Error: No plugins installed.
==> default: Trigger run failed
==> default: A script exited with an unacceptable exit code 1.
A script exited with an unacceptable exit code 1.
1 Like