plugins-wp/wp-product-importer
Admin dc26d50c6b update structure 2026-01-09 10:05:06 +07:00
..
includes update structure 2026-01-09 10:05:06 +07:00
readme.md update structure 2026-01-09 10:05:06 +07:00
wp-product-importer.php update structure 2026-01-09 10:05:06 +07:00

readme.md

  • Run cron

    wp cron event run wpi_import_products_cron --allow-root wp eval "do_action('wpi_import_products_cron');" --allow-root wp eval "do_action('wpi_import_products_cron', ['worker' => 1]);" --allow-root

    wp cron event run wpi_sync_categories_cron --allow-root wp eval "do_action('wpi_sync_categories_cron');" --allow-root

    wp cron event run wpi_trigger_import_cron --allow-root wp eval "do_action('wpi_trigger_import_cron');" --allow-root

    wp cron event run wpi_dispatch_import_workers --allow-root wp eval "do_action('wpi_dispatch_import_workers');" --allow-root

  • Run Cron tabs 0 2 * * * cd /var/www/html && wp cron event run wpi_trigger_import_cron --allow-root >> /var/log/wp-trigger-import.log 2>&1

            • cd /var/www/html && wp cron event run wpi_import_products_cron --allow-root >> /var/log/wp-import-products.log 2>&1
  • CLI WP

Xoá dữ liệu

  • wp --allow-root post delete $(wp --allow-root post list --post_type=product,product_variation --format=ids) --force
  • wp term delete product_cat
    $(wp term list product_cat --field=term_id --allow-root)
    --allow-root
  • wp post delete
    $(wp post list --post_type=attachment --format=ids --allow-root)
    --force
    --allow-root

Cài WP CLI

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info chmod +x wp-cli.phar mv wp-cli.phar /usr/local/bin/wp

Tìm kiếm tiến trình

ps aux | grep "wp eval" | grep "wpi_import_products_cron" | grep -v grep