Search by

tanjil / woo-laravel-migrator

Import and synchronize WooCommerce stores into Laravel applications through the WooCommerce REST API.

Maintainers

Package info

github.com/tanjilahmed7/woo-laravel-migrator

pkg:composer/tanjil/woo-laravel-migrator

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-07-16 17:30 UTC

This package is auto-updated.

Last update: 2026-08-16 17:46:15 UTC


README

Import and synchronize a WooCommerce store into a Laravel application through the WooCommerce REST API — no WordPress code inside Laravel, no direct database access to the shop.

License: MIT

Features

  • Full catalog import: products, variations, taxonomy, attributes, images
  • Customer and order import with line items, addresses, shipping/tax/fee lines
  • Coupons, refunds, reviews, order notes, downloadable files
  • Resumable, idempotent, queued imports with checkpointing
  • Safe image downloads (SSRF guard, MIME validation, deduplication)
  • Local image storage — images work even when WordPress is offline
  • Hybrid schema: structured columns + meta_data JSON + optional raw_payload
  • Custom table prefix (wc_ by default)
  • Extension adapter system for WooCommerce plugins

Requirements

  • PHP 8.2+
  • Laravel 11, 12, or 13
  • WooCommerce REST API (wc/v3)

Quick start

composer require tanjil/woo-laravel-migrator

php artisan woo:install
php artisan migrate
php artisan woo:test
php artisan queue:work --queue=woo-imports   # for queued imports
php artisan woo:import

For small stores or quick tests:

php artisan woo:import --sync

Documentation

Full usage guide → docs/USAGE.md

Covers installation, configuration, Docker, importing, syncing, images, using data in your app, commands, and troubleshooting.

Common commands

php artisan woo:install              # interactive setup
php artisan woo:doctor             # diagnostics
php artisan woo:test               # test API connection
php artisan woo:import             # full import (queued)
php artisan woo:import --sync      # run in-process
php artisan woo:import --fresh --force
php artisan woo:sync               # incremental sync
php artisan woo:status             # import progress
php artisan woo:connection:reset --force

Environment variables

WOO_MIGRATOR_URL=https://shop.example.com
WOO_MIGRATOR_CONSUMER_KEY=ck_xxxx
WOO_MIGRATOR_CONSUMER_SECRET=cs_xxxx
WOO_MIGRATOR_TABLE_PREFIX=wc_
WOO_MIGRATOR_QUEUE=woo-imports
WOO_MIGRATOR_DISK=public
APP_URL=http://localhost:8000        # must match how you access the app

Images

Product images are downloaded to Laravel storage. After download, wc_product_images.src_url contains the local storage URL, not the WordPress URL.

php artisan storage:link

Set APP_URL correctly (including port) so image URLs resolve.

Docker

When Laravel runs in Docker, WOO_MIGRATOR_URL must be reachable from inside the container. See docs/USAGE.md#docker.

Development

composer install
vendor/bin/phpunit

A demo WooCommerce store is available under dev/demo-store/.

License

MIT — see LICENSE.