OctoberCMS useful CLI commands
There are needs when you want to quickly install or update something without using web-ui
alternatively you want to build tool to automate some process. In those times this cli commands are useful
.
lets check them out
OctoberCMS CLI commands
Change Backend User Password
Solution of : How to reset backend-User password ?
This is the main question once we forgot backend password. here is the solution of it.
php artisan october:passwd "username" "password"
if you are still stuck check this tutorial for other ways to reset bakend user password.
System Level Commands
Update OctoberCMS
To update OctoberCMS Directly from command line you can use this command.
php artisan october:update
Database operations
Database Operations - migrate all data
This db 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:up
Plugin management operations
Install plugin
At some point we need to install plugin then this command will be at help.
php artisan plugin:install {AuthorName}.{PluginName}
List Plugins
php artisan plugin:list
Disable Plugin
php artisan plugin:disable {AuthorName}.{PluginName}
Enable Plugin
php artisan plugin:enable {AuthorName}.{PluginName}
Remove plugin
php artisan plugin:remove {AuthorName}.{PluginName}
Plugins and Themes development operations
Refresh plugin
When you are developing plugin often you need to re-test it again and again. if your plugin is using database tables then we show old records there each time. to clear them you can use this command.
php artisan plugin:refresh {AuthorName}.{PluginName}
Pull all repos
If you are working remote server with git repositories for plugins and themse then this command is for you.
Once you develop your themes and plugins you may need to push those changes to the server you can use this command.
git pull
on all theme and plugin directories
.php artisan october:util git pull
Cache commands
Clear Cache
Some time when you modify your code and it did not reflected on frontend so may its due to caching. so its good idea to clear cache to check if we are not stuck because of cache
php artisan cache:clear
Purge thumbnails
If you are using thumnail generation in your code most often then you may use this command. sometime you ended up creating thumbs which you dont use any more so to create thumb cache may help you to free some of space and needed thumbs will be regenerate again.
php artisan october:util purge thumbs
Related Questions
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS