Skip to main content

Build Hooks

Learn how to use Build Hooks for your project.


This section provides information on how to configure build hooks on your WordPress backend.

What Are Build Hooks?

Build Hooks trigger builds in one or more Front-End Sites when any content changes occur, such as creating, updating, or deleting.

Refer to the Front-End Sites Overview guide for instructions on how to create and manage Build Hooks in the Pantheon dashboard.

Install and Activate WP Webhooks Plugin

Install and activate the WP-Webhooks Plugin to create build hooks.

Create a Build Hook That Triggers When a Post Is Created Or Updated

  1. Generate a Build Hook on your build platform.

  2. Navigate to your WordPress admin dashboard and open the WP Webhooks plugin interface.

  3. Click the Send Data tab.

  4. Select the Post Created Webhook trigger.

  5. Click Add Webhook URL, name the hook, and then paste the build hook URL that you generated.

  6. Submit the form.

  7. Select Settings under the Action menu.

  8. Enter publish under the Trigger on post status setting and toggle the fire only once per instance option on.

  9. Save your settings.

You can repeat these steps to create a build hook for the Updated Webhook trigger.

Test The Post Build Hook

  1. Open your WordPress admin dashboard.

  2. Create a new Post or update a previously existing post.

  3. Confirm that a new build triggered in the Site Overview page of your build platform.

Create Build Hooks for Multiple Frontend Environments

The WP Webhooks plugin allows multiple build hooks to be added under a single action. You can use this feature to trigger builds in multiple feature branches based on content updates in one WordPress instance.

Info:
Note

Generate separate build hooks for each of your sites' Front-End environments on your build platform before continuing.

  1. Navigate to your WordPress admin dashboard.

  2. Open the WP Webhooks plugin dashboard.

  3. Click the Send Data tab and select your desired Webhook trigger.

  4. Click Add Webhook URL, name the hook, and then add one of your previously generated build hook URL's before submitting this form.

  5. Repeat the previous steps for each build hook previously generated.