Want to show Salesforce data on your WordPress site? You can do it. And you don’t need to be a developer to make it happen.
In this article, I’ll show you how to pull data from Salesforce and display it on your WordPress site in simple steps.
Why Show Salesforce Data on WordPress?
Salesforce is excellent for collecting customer details, leads, and other relevant information.
But what if you want to:
- Show lead data on your website?
- Share custom reports with your team?
- Display user activity or contact info on a portal?
That’s when showing Salesforce data on WordPress makes sense.
Can WordPress and Salesforce Work Together?
Yes. They can.
Salesforce doesn’t connect to WordPress on its own. But you can use:
- Plugins
- API (if you want custom control)
- Third-party tools
Let’s break each down.
Option 1: Use a Plugin
The easiest way is with a plugin.
Step 1: Pick a Plugin
Some popular options:
- WPForms with Salesforce Addon (fantastic for form data)
- Gravity Forms Salesforce Add-On
- WordPress-to-Lead for Salesforce CRM
Step 2: Install and Activate
Go to WordPress dashboard → Plugins → Add New → Search → Install and activate the one you choose.
Step 3: Connect Your Salesforce Account
Each plugin will ask for:
- Salesforce login
- API key or token
You’ll get this info from your Salesforce account under “Settings” → “App Manager” → Create a new app → Copy the API details.
Step 4: Set What You Want to Show
Now choose the fields or data you want to display:
- Contact name
- Lead status
- Company name
- Custom data
Each plugin has a simple dashboard where you can set this.
Step 5: Display on Your Website
Most plugins give you a shortcode. Place it where you want the data to appear:
- Pages
- Posts
- Widgets
Done!
Option 2: Use Salesforce API (Manual Way)
This is for people who want more control.
Step 1: Create a Connected App in Salesforce
- Go to Salesforce → Settings
- Choose Apps → App Manager
- Click New Connected App
- Add basic info (App name, email)
- Check “Enable OAuth Settings”
- Add callback URL (example: https://yoursite.com/callback)
- Choose scopes like API access
- Save and copy your Consumer Key and Secret
Step 2: Get an Access Token
Use tools like Postman to send a request and get your access token using the key and secret.
Step 3: Write Code to Pull Data
Use simple PHP code on your WordPress site.
Example:
$response = wp_remote_get(‘https://yourinstance.salesforce.com/services/data/vXX.0/query/?q=SELECT+Name+FROM+Lead’, [
‘headers’ => [
‘Authorization’ => ‘Bearer YOUR_ACCESS_TOKEN’,
],
]);
$data = json_decode(wp_remote_retrieve_body($response), true);
Step 4: Display Data
Loop through the data and print it:
foreach($data[‘records’] as $record){
echo ‘<p>’ . $record[‘Name’] . ‘</p>’;
}
You can place this in a custom plugin or theme file.
Option 3: Use Zapier or Make (No Code)
This is a no-code method.
Step 1: Create Accounts on:
- Zapier.com
- Your WordPress site (with plugins like WP Webhooks)
- Your Salesforce account
Step 2: Create a Zap (Zapier Workflow)
- Choose Salesforce as the trigger
- Pick the event, like “New Lead”
- Set action as Webhooks by Zapier
- Use Webhook to send data to your WordPress endpoint.
This helps you push Salesforce data to your WordPress site.
Best Use Cases
- Show user details after login.
- Build customer dashboards.
- Send form submissions to Salesforce.
- Display CRM info in real-time
Tips to Keep in Mind
- Secure your connection with HTTPS
- Never show private data on the frontend
- Refresh tokens if using the API.
- Use caching to speed things up.
- Use shortcodes to show data anywhere.
FAQs
1. Can I display Salesforce data without coding?
Yes. Use plugins or Zapier.
2. Is it safe to connect WordPress and Salesforce?
Yes, as long as you use HTTPS and secure tokens.
3. What kind of data can I show?
Leads, contacts, deals, reports, or custom fields.
4. Can I push WordPress data to Salesforce?
Yes. Many plugins support two-way sync.