OCMLABS/MODULE-WORDPRESS · OVERVIEW

Render WordPress blog content on your Magento 2 storefront

  • Magento
  • Adobe Commerce
  • Hyvä

The OCMLabs WordPress Integration module renders WordPress blog content (posts, categories, tags, menus, and more) directly on your Magento 2 storefront. All content is fetched from WordPress via the REST API - there is no shared database between the two systems.

The Magento 2 WordPress integration extension is available from the OCM Labs store as a one-time purchase with 12 months of updates and support.

Full demo, 1:54

How it works

The integration has two parts:

  1. Magento module (OCMLabs_WordPressIntegration) - intercepts blog URLs, fetches content from WordPress, caches it, and renders it using Magento layout/templates
  2. WordPress plugin (ocmlabs-content-bridge-for-magento) - exposes custom REST API endpoints and sends cache-purge webhooks to Magento when content changes
ASCII DIAGRAM
Magento storefront (/blog/*)
  -> Router (intercepts blog URLs at sortOrder 25)
  -> Repositories (PostRepository, CategoryRepository, etc.)
  -> API Client (Guzzle HTTP)
  -> WordPress REST API
     /wp-json/wp/v2/*          (core WP endpoints, no auth)
     /wp-json/oc-bridge/v1/*   (custom plugin endpoints, X-OC-Bridge-Key header)

WordPress content change
  -> ocmlabs-content-bridge-for-magento fires webhook POST
  -> Magento verifies HMAC-SHA256 signature
  -> Purges relevant cache tags
WordPress as a headless CMS for Magento, 1:02
WordPress Integration without database access, 1:24
WordPress vs Magento: why not use both, 1:16

Requirements

MODULE
OCMLabs_WordPressIntegration (Composer: ocmlabs/module-wordpress)
MAGENTO
2.4.8 - 2.4.9, Open Source and Adobe Commerce
PHP
8.3 - 8.4
WORDPRESS
6.0 or higher
OCMLABS CONTENT BRIDGE PLUGIN
Free on WordPress.org

What it renders

  • Blog post listing with pagination
  • Single post pages with featured image, author, categories, and tags
  • Category archive pages
  • Tag archive pages
  • Author archive pages
  • Search results
  • WordPress navigation menus (optional)
Feature tour, 1:12

Content is cached

All WordPress API responses are cached in Magento’s cache backend using tagged cache entries. The default cache lifetime is 1800 seconds (30 minutes) for posts and 86400 seconds (24 hours) for categories and tags.

When you publish or update content in WordPress, the Content Bridge plugin sends a webhook to Magento that purges only the affected cache entries, including the cached blog pages in the full page cache (built-in or Varnish). Visitors see the change on the next page load, without the overhead of disabling caching entirely.

SEO

When enabled, the module pulls SEO metadata (meta title, description, Open Graph tags, Twitter Card tags, and JSON-LD Article schema) directly from Yoast SEO or RankMath in WordPress and applies it to the corresponding Magento page.

Documentation guide

Start with installation and the connection, then pick the sections you need. Every page in this module is listed below.

Set it up

Configure the blog

Storefront features

The WordPress plugin

For developers

Reference

Get WordPress Integration on the OCM Labs store, or browse all OCM Labs Magento extensions. The agency behind the modules offers installation and upgrade help and custom module work.

Related modules

Related guides