Google Shopping CLI Commands for Magento 2
Looking for Magento 2 Google Shopping feed? View the full Magento 2 Google Shopping feed page to explore features, configuration options, and pricing.
Command line tools for the Google Shopping Feed extension. These commands are useful for manual feed generation, automation scripts, and troubleshooting.
Available Commands
| Command | Description |
|---|---|
googleshopping:feed:create |
Generate the main product feed |
googleshopping:feed:cleanup |
Remove old feed files |
googleshopping:inventory:create |
Generate the inventory feed |
googleshopping:promo:create |
Generate the promotions feed |
googleshopping:feed:create
Generates the main Google Shopping product feed. This is the same feed that runs via cron.
# Generate feeds for all enabled store views
bin/magento googleshopping:feed:create
# Generate feed for specific store view only
bin/magento googleshopping:feed:create --store-id=1
Options:
| Option | Description |
|---|---|
--store-id |
Generate feed for this store view only. If omitted, all enabled store views are processed. |
Output: Shows progress and the number of products exported per store view.
Use this when:
- Testing feed generation without waiting for cron
- Troubleshooting feed issues (CLI provides more detailed output)
- Running feed generation from deployment scripts
- Manual feed refresh after catalog updates
googleshopping:feed:cleanup
Removes old feed files from the feed directory. Useful for cleaning up storage.
bin/magento googleshopping:feed:cleanup
Use this when:
- Disk space is running low
- You want to remove outdated feed files
- After changing feed filenames
googleshopping:inventory:create
Generates the inventory feed for real-time stock updates.
# Generate inventory feeds for all enabled store views
bin/magento googleshopping:inventory:create
# Generate inventory feed for specific store view
bin/magento googleshopping:inventory:create --store-id=1
Options:
| Option | Description |
|---|---|
--store-id |
Generate inventory feed for this store view only |
Use this when:
- You need immediate stock level updates
- Testing inventory feed configuration
- Running more frequent inventory updates than the main feed
googleshopping:promo:create
Generates the promotions feed for Google Merchant promotions.
# Generate promo feeds for all enabled store views
bin/magento googleshopping:promo:create
# Generate promo feed for specific store view
bin/magento googleshopping:promo:create --store-id=1
Options:
| Option | Description |
|---|---|
--store-id |
Generate promo feed for this store view only |
Use this when:
- You've added or changed promotions
- Testing promotions feed configuration
Examples
Manual feed generation after catalog update
# Generate fresh feed immediately
bin/magento googleshopping:feed:create --store-id=1
# Optionally generate inventory feed as well
bin/magento googleshopping:inventory:create --store-id=1
Generate all feeds (deployment script)
# After deployment, regenerate all feeds
bin/magento cache:flush
bin/magento googleshopping:feed:create
bin/magento googleshopping:inventory:create
bin/magento googleshopping:promo:create
Troubleshoot specific store view
# Generate with output visible
bin/magento googleshopping:feed:create --store-id=1
# Check the generated feed
cat var/export/googleshopping/googleshopping_1.xml | head -100
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team
For a complete overview of features and configuration options, see Magento 2 Google Shopping feed.