Artisan Commands Reference

The commands TruCMS and its bundled modules add, plus the package commands you need when working on plugins and themes. Run php artisan list for everything, and php artisan help <command> for options.

Core

CommandDoesRun it
dotartisan:optimizeCaches config and routes, clears compiled views, then compiles Blade views for every theme. Run automatically after .env-backed settings are saved and during updatesOn production after deploys; never while you are editing routes
dotartisan:cache-viewsCompile all Blade views in resources/themesPart of the above
dotartisan:clean-tempDelete stale temporary uploadsOccasionally, or from the admin System tools
dotartisan:tickets:autocloseClose inactive support tickets (after config('tickets.autoclose-days'))Not scheduled by default; add it to a schedule if wanted
dotartisan:translations:missing, dotartisan:translations:unusedFind translation keys used but not defined, or defined but not usedBefore a release
pages:refresh-boundRe-bake every data-bound section with current dataScheduled hourly; run by hand after bulk imports
slugs:backfillCreate or validate global slug rows for every model in config('slugs.models')After adding a sluggable model to existing data
templates:auditReport on the section library: coverage, use by website templates and pages, gapsWhen working on the template library
templates:export-previewsRender library layouts and template pages to static HTML for screenshotsWhen producing preview images
responsecache:clearEmpty the full-page cacheWhen debugging cached output

Bundled modules

CommandDoesScheduled
booking:cleanup-payment-intentsCancel expired pending booking payment intents and remove old cancelled onesHourly
booking:renew-calendar-watchesRenew Google Calendar push subscriptions before they expireDaily 03:20
trucommerce:checkout-intents:expireExpire stale checkout intents and release reserved coupon or promotion usageEvery 15 minutes
trucommerce:stock:release-holdsRelease stock held by stale unpaid cartsEvery 15 minutes
trucommerce:cleanupRemove expired and draft shop data no longer neededDaily 02:10
trucommerce:optimizeRefresh shop caches and derived product informationDaily 02:30
trucommerce:media:generate-missing-conversionsCreate missing image conversions for shop mediaDaily 03:00

Modules and plugins

CommandDoes
module:listAll modules with status and priority
module:enable Name, module:disable NameFlip the flag in modules_statuses.json. Unlike the Plugin Manager these do not check dependencies or protection
module:migrate Name, module:seed NameRun one module's migrations or seeders (plain php artisan migrate also includes enabled modules)
module:publish NameCopy resources/assets to public/modules/{name}
module:make Name, module:make-model, module:make-controller, module:make-migration…Generators that put files in the right module folders and namespaces
module:delete NameDelete a module folder without any of the Plugin Manager's checks

After copying a module in by hand, run composer dump-autoload: module classes are added to Composer's autoloader only when it regenerates its files.

Themes

CommandDoes
theme:listInstalled themes and their parents
theme:refresh-cacheRebuild the cached list of theme.json files; run after adding or editing one
theme:create, theme:package, theme:install, theme:removeTheme package commands from the theme library. TruCMS does not use theme packages for distribution; see Creating a theme

Translations and media

CommandDoes
translations:importLoad keys from lang/ files into the Translations screen
translations:exportWrite the Translations screen's values back to lang/ files
media-library:regenerateRebuild image conversions (after changing a conversion)
media-library:cleanRemove orphaned files and outdated conversions

Everyday Laravel commands in a TruCMS context

CommandWhen
php artisan optimize:clearSomething you changed in code, config, routes or .env is ignored. Also flushes the response cache (it clears the cache)
php artisan migrateAfter activating or updating a plugin (the Plugin Manager does not migrate)
php artisan schedule:listCheck that your plugin's configureSchedules() registered its tasks
php artisan storage:linkUploaded files return 404 (also available in System tools)

Initial installation is not an Artisan task

Install TruCMS through its web installer. The dotartisan:install command you may see in the list belongs to the installer package and generates its service classes; it does not install a site.