Skip to content

Commands

Every command from app/Console/Commands and app-modules, read from the source. Run them through DDEV: ddev artisan <command>. --help lists every option.

Modular finds commands in a module’s src/Console/Commands. content-management keeps its own by feature and lists them in CmsServiceProvider.

Before you run one on real data:

  • Destructive below means it deletes data or overwrites work staff may have done, in a way you can’t undo with the command itself. Take a backup first.
  • Writes means it changes data in a way that’s normally what you want, and repeating it is safe or skipped by the command.
  • Read-only means it changes no application data.
  • Many offer --dry-run, which is a good first step. Note that cms:set-aside-overview-images turns this around: it only reports unless you pass --apply.

Anything scheduled is noted, and listed with its times on Queues and scheduling.

Command Effect What it does
cms:reindex Writes Rebuilds site_documents. With no options: everything, every site. --site= (id or domain) limits it to one site. --type= with --source-id= rebuilds one entity, without re-resolving canonical terms or item counts. A few minutes on the full catalog
cms:publish-due Writes Reindexes content whose published_at has arrived, since nothing else saves it then. --since= looks back from a given time rather than the last run. Scheduled
catalog:search-rebuild Writes (index only) Builds a fresh Meilisearch index and swaps it in, so search keeps working throughout
catalog:search-settings Writes (index only) Pushes the search relevance settings without rebuilding documents
Command Effect What it does
roles:sync Writes Writes config/roles.php and the registered capabilities to the database. Deletes permissions no module registers, and undefined roles nobody has. Run on every deploy. See Authorization

Source arguments are the feed handles: midocean, umbrellacompany, xdconnects, laltex, pfconcept, pencarrie, ralawise and uneek.

Command Effect What it does
catalog:sync-supplier {source} Writes Refreshes a feed’s supplier products, brings its catalog products in line, then its stock. Recorded in the feed’s Sync history. --stock updates only stock. A feed that fails leaves the last good copy, and the command fails
catalog:run-due-syncs Writes Queues the sync that is due by the feeds’ schedules, one at a time. Scheduled
catalog:add-supplier {source} Writes Queues all of a feed’s New products into the catalog by category mapping, as drafts. Products with no mapping are left out and listed on the background task
catalog:publish-supplier {source} Writes (goes live) Publishes a feed’s drafts in one update, skipping observers, so run cms:reindex and catalog:search-rebuild after it. --dry-run
catalog:prune-sync-inputs Destructive Deletes saved inputs of sync runs older than Settings > Housekeeping allows. The run records stay, and each feed’s latest good products run keeps its inputs. Scheduled
catalog:midocean {feed?} Read-only Explores the midocean API: --limit=, --find=, --schema, --save= (writes a file), --list=, --path=
catalog:check-branding {source} {eligibility} Read-only Compares what the branding rules offer on a feed with an eligibility table (JSON). Builds products in memory. Writes its differences to storage/app/branding-check/
catalog:export-category-mappings Writes (files) Writes current category mappings to the seeder’s data files, so mappings made in the admin reach other installs. --source=, --directory=
catalog:group-colours {source} Writes Groups our colours that have none, from a feed’s colours. Run a sync first. --for= groups a feed’s own colours instead. --dry-run
Command Effect What it does
catalog:refresh-from-prices Writes Works out “From” prices again through each product’s pricing engine, queued. Prices set by hand are left alone. --source=, --product=, --now
catalog:regenerate-photos Writes Remakes photo sizes with the current photo rules, skipping unchanged photos. --source=, --product=, --force, --measure-only, --now
catalog:pick-primary-photos Destructive Picks primary photos again by the download rules, replacing ones staff may have chosen. Requires --source= or --product=. --dry-run
catalog:tag-photos-by-colour Writes Tags untagged product photos with a colour from their names. Tags set in the admin never change. --product=, --option=, --dry-run
catalog:use-upscaled-photos Destructive Switches legacy photos’ files to an upscaled copy (--set=), or back (--restore). Queued unless --now. --product=, --limit=, --dry-run
catalog:category-tiles Writes Gives categories tile images from the picks file. Staff uploads are kept. --only=, --dry-run
catalog:colours-from-names Writes Gives code-less colours a code or a split chip from known names. Colours with a code are left alone. --dry-run
catalog:order-option-values {handles?*} Writes Puts option values back in their rule’s order, undoing values dragged out of place. Types ordered by hand are left alone. --dry-run
catalog:replace-legacy {csv} Destructive Replaces legacy products with supplier products from a reviewed CSV: carries content over, repoints sales lines, deletes the legacy product and redirects its URLs. --dry-run shows the plan. It asks first, unless --force
Command Effect What it does
sales:import-legacy {steps?*} Writes Imports from the legacy database: staff, customers, quotes, orders, purchase-orders, history, attachments, in that order when none are named. Each skips rows it already imported, so it can be stopped, resumed and re-run. Uses the query builder, so no events, automations or emails fire. --database=
sales:sequence {type?} Writes With no arguments, shows the next number of each document type. --next= moves a sequence forward (it refuses to move back, which could re-issue a number). For cutover
sales:fetch-exchange-rates Writes Refreshes rates for the currencies sites use. A failure keeps the previous rates. Scheduled
sales:mark-overdue-invoices Writes Stamps past-due invoices with a balance as overdue, once each, and announces it (timeline, automations). Scheduled
quote-cart:recover Writes (sends email) Marks stale active carts abandoned, and emails recovery nudges to eligible ones. Scheduled
quote-cart:prune Destructive Hard-deletes abandoned carts with no email and no customer past sales.cart.prune_anonymous_after days, and unattached artwork uploads. Scheduled
Command Effect What it does
automations:run-due Writes Starts delayed rules that are due. If automations are switched off, due runs are dropped, not caught up. Scheduled
cms:refresh-reviews Writes (cache) Fetches reviews for each store a reviews widget shows. --store=. Scheduled

These read the smooth and wordpress database connections. See Getting started.

Command Effect What it does
app:import-catalog Writes Imports sites, categories, products and custom fields from the legacy database. --skip-images (or IMPORT_SKIP_IMAGES), --after-id= resumes after a legacy product id. Refresh options do only that one thing to imported records: --search-keywords, --refresh-category-text, --refresh-product-text
app:import-catalog --refresh-category-articles Destructive Replaces imported categories’ legacy articles and FAQs. Their other content blocks stay
app:import-wordpress Writes Imports posts, categories and tags. Matched by slug and email, so a re-run skips what exists. --site=, --skip-images. --refresh brings existing posts and categories up to date with the source, overwriting edits
app:wordpress-clean-bodies Writes Cleans imported posts’ text blocks to plain HTML. Stable, so a second run changes nothing. --dry-run
app:wordpress-align-images Writes Places pictures in imported posts. A paragraph already aligned keeps its alignment. --dry-run. --reset is destructive: it places every picture afresh, discarding editors’ alignments too
app:pixabay-overview-images Writes Picks stock photos for posts without an overview image into a picks file (--queries=, --picks=, --avoid=), and --apply downloads and attaches them. Needs PIXABAY_API_KEY
cms:set-aside-overview-images Writes Reports post overview images that don’t suit the 16:10 frame, and with --apply moves them aside. Files stay, and --restore brings them back. --min-ratio=, --max-ratio=, --min-width=, --post=

Not ours, but part of how the app runs:

Command Use
horizon, horizon:terminate, horizon:snapshot Queue workers: Queues and scheduling
queue:work assistant, queue:restart The assistant’s own worker
reverb:start Websockets
schedule:run, schedule:work, schedule:list The scheduler
model:prune Scheduled for background tasks, tool calls and automation runs
activitylog:clean Scheduled through the housekeeping setting
modules:list, modules:sync, modules:cache, modules:clear From internachi/modular
filament:optimize On deploy