Integrate WordPress v2

  • Updated

In Optimizely Content Marketing Platform (CMP), your team can work collaboratively on tasks and publish them on WordPress using the omnichannel editor and take advantage of embedded AI and full-page SEO recommendations. You can preview how the content will look on the webpage and publish it securely with the WordPress API inside CMP.

You need admin access to integrate WordPress v2. 

The integration supports both standard and custom post types, as well as advanced custom and remote fields (fields pulled into CMP directly from WordPress).

  • Plan, create, schedule, and publish your WordPress posts directly from CMP.
  • Use the omnichannel editor and its powerful capabilities, such as AI-powered content optimization, side-by-side translations, commenting, and full webpage SEO.
  • Get a side-by-side preview of webpage content in CMP without needing a personal login for WordPress.
  • Choose from custom content types, such as blog posts, videos, landing pages, and more.
  • Use remote fields from your WordPress instance, such as a list of authors, categories, and tags.
  • Publish your content securely through the WordPress API instead of feeds.

Differences from v1

This integration uses the omnichannel editor rather than the text editor. It supports everything from WordPress V1 while letting you customize post types, such as videos and landing pages, and preview content without leaving CMP or needing a WordPress login. It also supports advanced custom fields and remote fields. The integration uses WordPress API for publishing instead of feeds, which adds another layer of security.

These are the features in WordPress v1 and WordPress v2:

  • WordPress v1
    • Text editor with AI and partial SEO
    • Publishing through Feeds
    • Blog posts
  • WordPress v2
    • Omnichannel editor with AI, translations, and full webpage SEO
    • Publishing through an API (more secure)
    • Blog posts
    • Custom post types
    • Side-by-side preview of content in CMP as it will look on the webpage
    • Advanced custom fields
    • Remote Fields

Integrate WordPress v2 for basic post types

Integrating WordPress with Optimizely CMP lets you publish content directly and preview articles on your site. The CMP analytics plug-in gives you content analytics for published articles. You can also edit SEO fields, select categories, and choose authors from within the CMP. This integration supports both WordPress standard and custom post types.

  1. Go to your avatar > Integrations > Website, CMS & Feed.
  2. Click Add > WordPress V2. This is a feature flag and only displays if your organization is signed up for it. Contact Optimizely Support for information. 

  3. Fill out the form with the necessary information.

    1. Name – The name of your site.
    2. WordPress Site URL – The base URL used by the integration to access your REST API.
    3. Username – Your WordPress username. This should be a separate Optimizely-specific account for this integration.
    4. Application Password – The password you generate in WordPress for the integration. This is not the same as the regular password. Go to Users > Profile in WordPress, and enter a descriptive name for New Application Password Name. Enter the password into CMP then click Connect.

      To minimize the risk of unauthorized access, CMP’s WordPress integration stores all credentials securely in the database in encrypted form, and only the microservice that communicates with WordPress has access to the decryption key.

    5. Allowed Publish Status – The publishing status of the final page. You can limit it to draft for organizational limits or workflow requirements. You must have at least one status for the integration.
    6. Optimizely Plugin – The plugin for the integration's functionality. Contact Optimizely Support for the latest version of the plugin. 

      The WordPress v2 Plugin is different from the WordPress v1 Plugin. These integrations are separate due to their functional difference (Feed instead of API consumption). 

    7. Javascript Snippet – The access to CMP's content analytics. Toggle this On to have the snippet inserted automatically within all published pages. It does not affect the security or performance of your site. You can also insert the code with third-party script management solutions.
  4. Complete the process. CMP generates a content model for your WordPress site under Templates > Content Model. This is read-only.

    WordPressv2 content model.png

    If completion fails, add the CMP IPs to your allowlist and retry.

    1. 18.215.7.9
    2. 54.165.194.40

Publish to WordPress

  1. Go to a task and create a task in which you want to publish to WordPress.
  2. Go to the Content tab and click Add Content. Select the Content Type with your site's name. This is the name you set during the integration.

    WordPress Content Type.png

  3. Fill in the structured content that displays as needed.

    Structured Content.png

  4. Go to Publishing. Click Add Channel and select the WordPress V2 channel that you connected above. You can also automate this by selecting this channel as the default value when creating a WordPress Publishing workflow. This populates the publishing destination automatically.

    WordPress publishing channel.png

  5. Edit the Publish DatePublish Status, and Canonical URL as needed. Click Save.

    WordPress Publishing Settings.png

  6. Fill in your content body in the Content tab and select Preview to see a side-by-side preview.

    Each preview in this integration generates a new post on your WordPress site and loads it with the CMP WebProofing Middleware. This can cause multiple API hits to your site, depending on the number of previews generated. This is safe. To ensure that CMP Webproofing Middleware can access your site, create an allow list for the relevant IP Addresses. Contact Optimizely Support for an updated list of IP Addresses. The CMP WordPress v2 Plugin deletes all preview posts after one hour. To ensure that this does not fail, ensure the WordPress DELETE endpoint is not blocked on your site.

  7. Mark the task as complete to publish to WordPress.

If you make changes to the draft on WordPress, your changes are not reflected in the CMP task. You can only see the changes on WordPress.

Tags and categories

To let you set tags, categories, and authors from CMP, CMP makes calls to retrieve this data using the API endpoints specified in the WordPress spec for retrieving taxonomies and authors.

Draft publishing

When publishing in the CMP, you can sync posts by draft before publishing. Syncing creates a post with a post ID, which updates on future post syncs, and you can convert it to a live post at publishing time.

Troubleshoot

If you use PublishPress, you must disable it or whitelist CMP in it.