Skip to content

How to Display from Salesforce to WordPress

This guide shows you how to display from Salesforce to WordPress using simple tools and methods. You’ll learn to sync leads, accounts, or custom objects securely and efficiently—no coding required in most cases.

Key Takeaways

  • Use dedicated plugins: Tools like WP Salesforce integrate Salesforce data with WordPress easily and securely.
  • Leverage Salesforce REST API: For custom solutions, the API allows real-time data fetching and display.
  • Display data with shortcodes: Most plugins offer shortcodes to embed Salesforce records into posts or pages.
  • Ensure data security: Always use OAuth or secure API keys to protect sensitive customer information.
  • Test before going live: Preview your integration on a staging site to avoid errors on your live WordPress site.
  • Keep plugins updated: Regular updates ensure compatibility and security, especially after WordPress or Salesforce upgrades.

Introduction: Why Display Salesforce Data on WordPress?

If you’re using Salesforce to manage customer relationships, chances are you want to show some of that data on your website. Maybe you want to display a list of upcoming events, showcase customer testimonials, or show product availability. Whatever the reason, learning how to display from Salesforce to WordPress can make your site more dynamic and informative.

In this guide, we’ll walk you through the most effective and beginner-friendly ways to connect Salesforce with your WordPress site. Whether you’re a marketer, developer, or small business owner, you’ll find a method that fits your skill level. We’ll cover plugin-based solutions, API integrations, and troubleshooting tips—all designed to help you get your data live quickly and safely.

Method 1: Using a Salesforce Integration Plugin

The easiest way to display Salesforce data on WordPress is by using a dedicated plugin. These tools handle authentication, data syncing, and display—all without requiring you to write code.

How to Display from Salesforce to WordPress

Visual guide about How to Display from Salesforce to WordPress

Image source: fireplugins.com

Step 1: Choose the Right Plugin

Popular options include WP Salesforce, Salesforce WordPress Integration, and Zapier for WordPress. For most users, WP Salesforce is a great starting point because it’s free, well-documented, and supports common objects like Accounts, Contacts, and Leads.

Step 2: Install and Activate the Plugin

Go to your WordPress dashboard, navigate to Plugins > Add New, and search for “WP Salesforce.” Click “Install Now” and then “Activate.”

Step 3: Connect to Salesforce

  • Go to Salesforce > Settings in your WordPress admin.
  • Click “Connect to Salesforce” and log in with your Salesforce credentials.
  • Authorize the connection when prompted. This uses OAuth, which is secure and doesn’t store your password.

Step 4: Configure Data Mapping

Once connected, choose which Salesforce objects you want to display (e.g., Accounts or Opportunities). Map the fields you want to show—like Name, Email, or Status—to WordPress shortcodes.

Step 5: Display Data Using Shortcodes

Most plugins generate shortcodes you can paste into any post or page. For example:

[salesforce object="Account" fields="Name, Industry" limit="5"]

This will display a list of up to five accounts with their names and industries. You can style the output using CSS if needed.

Method 2: Using the Salesforce REST API (Advanced)

If you need more control or want to build a custom solution, you can use the Salesforce REST API. This method requires some technical knowledge but offers greater flexibility.

Step 1: Set Up a Connected App in Salesforce

  • Log in to Salesforce and go to Setup > App Manager.
  • Click “New Connected App” and fill in the basic details.
  • Enable OAuth and set the callback URL to your WordPress site (e.g., https://yoursite.com/auth).
  • Note down the Consumer Key and Consumer Secret—you’ll need these later.

Step 2: Generate an Access Token

You’ll need to authenticate your WordPress site with Salesforce. One way is to use a plugin like OAuth Client or write a custom script that requests a token using the Consumer Key and Secret.

Step 3: Fetch Data with PHP

In your theme’s functions.php file or a custom plugin, use wp_remote_get() to call the Salesforce API. Example:

$response = wp_remote_get('https://yourinstance.salesforce.com/services/data/v58.0/query?q=SELECT+Name+FROM+Account', array(
  'headers' => array(
    'Authorization' => 'Bearer ' . $access_token
  )
));

Then decode the JSON response and display the data in your template.

Step 4: Cache the Results

To improve performance, cache the API response using WordPress transients. This prevents hitting Salesforce limits and speeds up page load times.

Method 3: Using Zapier for Automation

If you don’t need real-time data but want to sync records periodically, Zapier is a powerful no-code option.

Step 1: Create a Zap

Go to Zapier.com and create a new Zap. Set Salesforce as the trigger app (e.g., “New Record in Salesforce”) and WordPress as the action app (e.g., “Create Post” or “Update Custom Field”).

Step 2: Map Fields

Link Salesforce fields to WordPress fields. For example, map a Salesforce Contact’s name to a WordPress post title.

Step 3: Test and Activate

Run a test to ensure data flows correctly, then turn on the Zap. Now, every time a new record is added in Salesforce, it will appear on your WordPress site.

Styling and Customization Tips

Once your data is displaying, you’ll likely want to improve its appearance. Here’s how:

Use Custom CSS

Most plugins add CSS classes to their output. You can target these in your theme’s stylesheet. For example:

.salesforce-account-list {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
}

For more advanced styling, consider using a page builder like Elementor. You can also check out our guide on best way to add CSS in WordPress website for tips.

Responsive Design

Ensure your tables or lists look good on mobile. Use media queries or a responsive table plugin if needed.

Troubleshooting Common Issues

Even with the best setup, you might run into problems. Here’s how to fix the most common ones:

Data Not Showing

  • Check your shortcode syntax.
  • Verify that the Salesforce connection is active.
  • Ensure the user profile in Salesforce has access to the object and fields.

API Limits Reached

Salesforce enforces API call limits. If you’re using the REST API, implement caching and avoid frequent polling. Consider using webhooks or platform events for real-time updates.

Plugin Conflicts

If your site breaks after installing a plugin, deactivate all plugins and reactivate them one by one to find the culprit. Also, make sure your theme is compatible. For help managing themes, see our article on how to deactivate a theme in WordPress.

Authentication Errors

If OAuth fails, double-check your callback URL and ensure your Salesforce org allows the connected app. Sometimes, IP restrictions or security policies block the connection.

Best Practices for Security and Performance

When displaying Salesforce data on WordPress, security and performance should be top priorities.

Use Read-Only Access

When possible, create a Salesforce user with read-only permissions for the integration. This limits damage if credentials are compromised.

Limit Data Exposure

Only display non-sensitive information publicly. Avoid showing emails, phone numbers, or internal notes unless absolutely necessary.

Keep Everything Updated

Regularly update your WordPress core, plugins, and themes. Outdated software is a common security risk. For guidance, read our post on how to update theme on WordPress.

Conclusion

Displaying Salesforce data on your WordPress site doesn’t have to be complicated. With the right plugin, a bit of configuration, and attention to security, you can create a seamless experience for your visitors. Whether you’re showing customer success stories, product updates, or event listings, integrating Salesforce with WordPress helps keep your content fresh and relevant.

Start with a plugin if you’re new to integrations, or explore the REST API if you need more customization. And remember—always test your setup on a staging site before going live. With these steps, you’ll master how to display from Salesforce to WordPress in no time.