October CMS includes several command-line interface (CLI) commands and utilities that allow you to manage various aspects of the platform, as well as speed up the development process. The console commands are based on Laravel's Artisan tool. You may develop your own console commands using plugins.
october:updateThe october:update command updates the platform. It will update the core application and plugin files, then perform a database migration.
php artisan october:updateThis is the same as running the following commands.
composer update
php artisan october:migrateoctober:migrateThe october:migrate command will perform a database migration, creating database tables and executing seed scripts, provided by the system and plugin version history. The migration command can be run multiple times, it will only execute a migration or seed script once, which means only new changes are applied.
php artisan october:migrateThe --rollback option will reverse all migrations, dropping database tables and deleting data. Care should be taken when using this command. The plugin:refresh command is a useful alternative for debugging a single plugin.
php artisan october:migrate --rollbackThe --skip-errors flag can be used to suppress any errors and force the migration path to complete. Care should be taken with this flag since some errors are necessary to ensure data integrity.
php artisan october:migrate --skip-errorsoctober:passwdThe october:passwd command allows the password of a backend administrator to be changed via the command line. This is useful if you are locked out of your October CMS install, or for changing the password for the default administrator account.
php artisan october:passwd username passwordFor the first argument you may pass either the login name or email address. For the second argument you may optionally pass the desired password, otherwise you will be prompted to enter one.
october:optimizeThe october:optimize will cache the framework and platform files for performance.
php artisan october:optimizeproject:syncproject:sync installs all plugins and themes belonging to a project.
php artisan project:syncproject:setproject:set sets the license key for the current installation.
php artisan project:set <license key>plugin:installplugin:install - downloads and installs the plugin by its name. The next example will install a plugin called AuthorName.PluginName.
php artisan plugin:install AuthorName.PluginNameYou may install a plugin from a remote source using the --from option.
php artisan plugin:install AuthorName.PluginName --from=git@github.com:authorname/pluginname-plugin.gitUse the --want option to specify a target branch or version.
php artisan plugin:install AuthorName.PluginName --from=git@github.com:authorname/pluginname-plugin.git --want=dev-developUse the --oc option if your package name has the oc prefix.
php artisan plugin:install AuthorName.PluginName --from=git@github.com:authorname/pluginname-plugin.git --ocplugin:checkplugin:check - performs a system wide check of installed plugin dependencies. This command will spin over every theme and plugin that is currently installed and check to see if its dependencies are also installed. If it finds any missing requirements, it will attempt to install them.
php artisan plugin:checkplugin:refreshplugin:refresh - destroys the plugin's database tables and recreates them. This command is useful for development.
php artisan plugin:refresh AuthorName.PluginNameUse the --rollback option to only destroy the database tables without recreating them.
php artisan plugin:refresh AuthorName.PluginName --rollbackYou may also specify a version number with the --rollback option to stop at a specified version.
php artisan plugin:refresh AuthorName.PluginName --rollback=1.0.3plugin:listplugin:list - Displays a list of installed plugins and their version numbers.
php artisan plugin:listplugin:disableplugin:disable - Disable an existing plugin.
php artisan plugin:disable AuthorName.PluginNameplugin:enableplugin:enable - Enable a disabled plugin.
php artisan plugin:enable AuthorName.PluginNameplugin:removeplugin:remove - destroys the plugin's database tables and deletes the plugin files from the filesystem.
php artisan plugin:remove AuthorName.PluginNametheme:installtheme:install - download and install a theme from the Marketplace. The following example will install the theme in /themes/authorname-themename
php artisan theme:install AuthorName.ThemeNameYou may install a theme from a remote source using the --from option.
php artisan theme:install AuthorName.ThemeName --from=git@github.com:authorname/themename-theme.gitUse the --want option to specify a target branch or version.
php artisan theme:install AuthorName.ThemeName --from=git@github.com:authorname/themename-theme.git
```--want=dev-develop
Use the `--oc` option if your package name has the `oc` prefix.
```bash
php artisan theme:install AuthorName.ThemeName --from=git@github.com:authorname/oc-themename-theme.git --octheme:checktheme:check - performs a system wide check of themes to see if they should be flagged read-only and protected from changes. This command will spin over every theme and check if it has been installed with composer, if so, a theme lock file is added and a child theme is created.
php artisan theme:checktheme:listtheme:list - list installed themes.
php artisan theme:listtheme:usetheme:use - switch the active theme. The following example will switch to the theme in /themes/rainlab-vanilla
php artisan theme:use rainlab-vanillatheme:removetheme:remove - delete a theme. The following example will delete the directory /themes/rainlab-vanilla
php artisan theme:remove rainlab-vanillatheme:copytheme:copy - duplicates an existing theme to create a new one, including the creation of child themes.
php artisan theme:copy <source-theme> [destination-theme]The following command creates a new theme called demo-copy from the source theme demo by copying the directory and its contents. The .themelock file will be removed during this process.
php artisan theme:copy demo demo-copyTo create a child theme that inherits the parent theme, specify the --child option.
php artisan theme:copy demo demo-child --childIf using database-driven themes, you may sync the database changes to the filesystem with the --import-db option.
php artisan theme:copy demo --import-dbTo delete all the database templates at the same time, use the --purge-db option.
php artisan theme:copy demo --import-db --purge-dbcache:clearcache:clear - clears the application, twig and combiner cache directories. Example:
php artisan cache:clearoctober:freshoctober:fresh - removes the demo theme and plugin that ships with October CMS.
php artisan october:freshoctober:mirroroctober:mirror - will mirror all asset and resource files to the public folder using symbolic linking.
php artisan october:mirroroctober:utiloctober:util - a generic command to perform general utility tasks, such as cleaning up files or combining files. The arguments passed to this command will determine the task used.
Outputs combined system files for JavaScript (js), StyleSheets (less), client side language (lang), or everything (assets).
php artisan october:util compile assets
php artisan october:util compile lang
php artisan october:util compile js
php artisan october:util compile lessTo combine without minification, pass the --debug option.
php artisan october:util compile js --debugThis will execute the command git pull on all theme and plugin directories.
php artisan october:util git pullDeletes all generated thumbnails in the uploads directory.
php artisan october:util purge thumbsDeletes files in the uploads directory that do not exist in the system_files table.
php artisan october:util purge uploadsDeletes records in system_files table that do not belong to any other model.
php artisan october:util purge orphans