Install and activate the OCMLabs Content Bridge for Magento WordPress plugin
The OCMLabs Content Bridge for Magento plugin is the WordPress-side component of the integration. It exposes custom REST API endpoints and sends cache-purge webhooks to Magento.
Requirements
- WordPress 6.0 or higher
- PHP 8.1 or higher
- The OCMLabs WordPress Integration Magento module installed
Installation
Via WordPress Admin
- In WordPress Admin, go to Plugins > Add New
- Search for OCMLabs Content Bridge for Magento and click Install Now
- Click Activate
The plugin is listed on WordPress.org.
Manual Installation
- Download the plugin ZIP from WordPress.org and extract it
- Copy the
ocmlabs-content-bridge-for-magento/folder towp-content/plugins/ - In WordPress Admin, go to Plugins and activate OCMLabs Content Bridge for Magento
Replacing the old OC Magento Bridge plugin
The plugin was previously distributed as OC Magento Bridge (oc-magento-bridge). The new plugin reads the same settings, so your API key and webhook settings carry over:
- Install and activate OCMLabs Content Bridge for Magento
- Deactivate OC Magento Bridge
- Remove the old
wp-content/plugins/oc-magento-bridge/folder from the server. Deleting it from Plugins in WordPress Admin also deletes the shared settings, including the API key, so you would have to copy a new key into Magento.
After Activation
On first activation, the plugin:
- Generates a random API key and stores it in WordPress options (an existing key is kept)
- Registers all REST API routes under the
oc-bridge/v1namespace
The API key is shown in Settings > OCMLabs Content Bridge for Magento. Copy it and paste it into the Magento module’s API Key field under Stores > Configuration > OCMLabs > WordPress Integration > Connection.
Verifying Installation
After activation, test that the REST endpoints are available:
$ curl -H "X-OC-Bridge-Key: your-api-key" \ $ https://your-wordpress-site.com/wp-json/oc-bridge/v1/options
A successful response returns a JSON object with site options. A 403 response means the API key is incorrect.
See also
Related pages
- Plugin settings: API key and Magento webhook URL
- Connect Magento to WordPress with the key you just copied
- Install the Magento module if you have not done that side yet