Orange Collar Media
Orange Collar Media
DOCS
ORANGECOLLAR/MODULE-WORDPRESS-INTEGRATION · OVERVIEW

Render WordPress blog content on your Magento 2 storefront

  • Magento
  • Adobe Commerce
  • Hyvä

The OrangeCollar 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.

How it works

The integration has two parts:

  1. Magento module (OrangeCollar_WordPressIntegration) - intercepts blog URLs, fetches content from WordPress, caches it, and renders it using Magento layout/templates
  2. WordPress plugin (oc-magento-bridge) - 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
  -> oc-magento-bridge fires webhook POST
  -> Magento verifies HMAC-SHA256 signature
  -> Purges relevant cache tags

Requirements

PHP
8.1 or higher
MAGENTO
2.4.8 or higher
WORDPRESS
6.0 or higher
OC MAGENTO BRIDGE PLUGIN
Latest

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)

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 oc-magento-bridge plugin sends a webhook to Magento that purges only the affected cache entries - so your visitors always see fresh content 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.

Next steps