Tuesday, June 23, 2026
HomeEveryday WordPressAutomate WordPress Go-Live with Salesforce & Kinsta API

Automate WordPress Go-Live with Salesforce & Kinsta API


When a deal closes in Salesforce, the site it represents still depends on a separate set of manual steps to go live. A developer has to find the right client site in MyKinsta, create a backup, and push staging to production, all at the right moment.

Using the Kinsta API, you can connect these two parts of the workflow so that deal approval automatically triggers the launch. Instead of relying on someone to carry out each step, the process runs as soon as the opportunity reaches the target stage.

It’s a straightforward setup: fire a batch of MyKinsta tasks when a Salesforce Opportunity updates, and remove the need for manual intervention after deployment. Meanwhile, your client gets a faster path from approval to a live site, without waiting on handoffs between teams.

What you need before you start

To follow this tutorial, you need a Kinsta account with a WordPress site that has both a staging environment and a live environment, a Salesforce account with access to Flow Builder, and Node.js installed locally for the middleware.

To authenticate with the Kinsta API, navigate to Your name > Company settings > API Keys in MyKinsta and click Create API Key.

The MyKinsta dashboard showing the API Keys screen.

Give the key a name, set an expiry, and click Generate. The key only displays once, so copy it before you close the modal. Store it in a .env file at the project root alongside your Company ID, which you find under Company settings > Billing Details:

KINSTA_API_KEY=your_api_key_here
KINSTA_COMPANY_ID=your_company_id_here

You also need a custom text field on the Salesforce Opportunity object to store the Kinsta site ID for each client project. Head to Setup > Object Manager, then to Opportunity > Fields and Relationships.

The Fields and Relationship within Salesforce Setup options pages.
The Fields and Relationship within Salesforce Setup options pages.

Here, add a Field Label, and Salesforce generates a Field Name that you need to note down. Set the Length to 255 and save your changes.

The site ID is a UUID that Kinsta assigns at creation. It appears in the MyKinsta URL when you open a site, or you can retrieve it once by calling GET /sites with your API key in place:

https://my.kinsta.com/sites/details/hyut4927-d324-4044-b794-67ap0rbf20bj/…

You use the site ID in a custom field on each Opportunity to trigger the entire workflow.



Source link

RELATED ARTICLES
Continue to the category

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Most Popular

Recent Comments