Getting Started
Haus Storefront Product Sync synchronizes products, collections, facet values, and related metadata from your Vendure backend into WordPress.
With this plugin you can:
- Sync products from Vendure into WordPress posts and meta
- Map Vendure collections and facet values to WordPress taxonomies
- Keep catalog data updated for Elementor dynamic tags and custom templates
- Run full or incremental sync via WP-CLI (with cron-friendly locking)
- A running Vendure Shop API
- WP-CLI on the WordPress host (required to run sync)
- WordPress admin access
- Recommended: Haus Storefront Elementor Widgets — supplies Vendure connection constants from Haus Storefront → Advanced
Install and Activate
- Install the plugin in
wp-content/plugins/wp-products-sync(Composer packagewearehaustech/wp-products-syncor deployment ZIP). - Activate Haus Storefront Product Sync on the plugins screen.
- Confirm Sync Settings appears under Haus Storefront (or as a top-level menu when Haus Storefront is not installed).
Connect to Vendure
The sync engine reads PHP constants — there is no API URL field in the Product Sync admin UI.
With Haus Storefront Elementor Widgets (recommended)
Configure Haus Storefront → Advanced:
- API URL — full Vendure Shop API URL (including
/shop-api/) - Default Channel Token — channel token for storefront requests
The main plugin defines VENDURE_API_URL and VENDURE_TOKEN for Product Sync on plugins_loaded.
Standalone
Add to wp-config.php:
define('VENDURE_API_URL', 'https://your-vendure-host/shop-api/');
define('VENDURE_TOKEN', 'your-channel-token');
Configure Sync Settings
Open WordPress Admin → Haus Storefront → Sync Settings (or Sync Settings when standalone).
Taxonomy mappings (optional)
Map Vendure data to WordPress taxonomies:
| Admin field | When | Purpose |
|---|---|---|
| Vendure source | always | collection or facet |
| WordPress taxonomy | always | Taxonomy slug in WordPress (for example product-brands) |
| Collection ID | source = collection | Root collection ID in Vendure |
| Facet Code | source = facet | Facet code in Vendure |
Synchronization options
| Option | Purpose |
|---|---|
| Flush permalinks after sync | Regenerate rewrite rules when slugs change |
| Keep removed items (soft delete) | Mark removed terms instead of deleting |
| Sync collection descriptions | Copy collection description text into WordPress |
| Enable custom field sync | Sync selected Vendure custom fields (configure selections below) |
When custom field sync is enabled, choose product, collection, and facet fields in Custom Field Selection.
Click Save to persist settings to the wp_products_sync_settings option.
Run a Sync
First full sync
wp sync-products sync
Waits up to 600 seconds (default) if another sync holds the lock. Override with --wait=<seconds>.
Incremental sync (cron)
wp sync-products syncUpdated
Fetches only products with updatedAt newer than the previous incremental run. Does not remove products deleted in Vendure — use the nightly full sync for reconciliation.
Recommended schedule
*/5 * * * * cd /path/to/wp && wp sync-products syncUpdated
0 3 * * * cd /path/to/wp && wp sync-products sync --wait=600
Both commands share one lock — only one sync runs at a time.
Other WP-CLI commands
| Command | Action |
|---|---|
wp sync-products removeLock | Clear a stuck sync lock |
wp sync-products delete | Destructive — delete all synced products |
wp sync-custom-fields sync | Sync Vendure custom-field definitions |
wp sync-custom-fields list | List stored custom-field definitions |
The admin UI includes a WP-CLI Commands reference dialog with the same commands.
Sync Health
Check status without admin access:
GET /wp-json/wp-products-sync/v1/product-sync-health
Returns ok, running, or locked. Use Unlock in the admin Status section if a lock is stuck.
Data Handling
Product Sync writes directly to WordPress tables.
Core tables
- Products:
wp_posts - Product metadata:
wp_postmeta - Taxonomy terms:
wp_terms+wp_term_taxonomy - Term metadata:
wp_termmeta - Product-to-taxonomy relationships:
wp_term_relationships
Product metadata keys
vendure_id— unique Vendure product ID used for matching updatesvendure_updated_at— last sync update timestampvendure_description— synced descriptionvendure_featured_asset_source— featured image URL/pathvendure_num_option_groups— option group countvendure_slug_mismatch— flag when WordPress slug differs from backendvendure_*— synced Vendure custom field values (prefixed keys)exclude_from_sync— skip this product on sync runs when set
Term metadata keys
vendure_collection_id— Vendure collection ID (collection taxonomies)vendure_term_id— Vendure facet value ID (facet taxonomies)vendure_updated_at— last sync update timestampvendure_soft_deleted— soft-delete flag when enabledvendure_term_image— synced term imagevendure_term_position— position/order from Vendurevendure_slug_mismatch— slug mismatch flagvendure_*— synced custom field values
Product Sync does not include a field-management UI for synced meta. Use a meta box plugin or Elementor dynamic tags (group Haus Storefront) to surface values in the admin or templates.
Logs
Daily sync logs are written under:
wp-content/uploads/vendure-sync/YYYY-MM-DD.log
Next Steps
- Plugin overview
- Haus Storefront Elementor Widgets
- Advanced settings — Vendure URL and channel token when using the main plugin