Generating invoices using CLI
The Invoicing Plugin includes a console command for maintaining and regenerating invoices from the command line.
Generate Missing Invoices
If invoices were not created automatically (for example, before the plugin was installed or after import), you can generate them manually with:
bin/console sylius-invoicing:generate-invoices
This command scans all existing orders and creates invoices for those that don’t already have one.
How It Works
Uses the same internal invoice generator as the automatic process.
Respects your configured order state trigger (default:
created
).Does not modify or regenerate invoices that already exist — only missing ones are created.
You can safely run this command multiple times; it won’t duplicate invoices.
Common Use Cases
After enabling the plugin in an existing store.
Following a data migration or import of past orders.
To repair missing invoices caused by failed events or state transitions.
Example Output

Last updated
Was this helpful?