Simply Boost Laravel Performance In Production

Didik Tri Susanto
Apr 4, 2017 · 2 min read
image credit to: https://blog.pisyek.com

Disable Unused Service

Sometimes you don’t need to load all services in your config, and you are free to disable unused service inside config file. Just simply add comment to unused service provider in config/app.php. But make sure after commenting, you don’t break whole functionality of your app.

Use Artisan Command

Laravel comes with a great tool named Artisan command and this is very usefull to boost performance using available artisan command. And here is my common setup:

php artisan config:cachephp artisan route:cachephp artisan optimize --force

Composer

Optimize autoload file using composer command:

composer dumpautoload --optimize
composer dumpautoload --classmap-authoritative

Conclusion

Once again, your Laravel best performance is affected by many factors. If you have done above steps but you feel there is no significant change, you may check other performance tweaking or infrastructure configuration to get better result.

Teknomuslim

Didik's thoughts and research about web development especially in Laravel and PHP Programming.

Didik Tri Susanto

Written by

Proud to be Moslem | Introvert | Web Developer | VP of Engineering DOT Indonesia | dot.co.id

Teknomuslim

Didik's thoughts and research about web development especially in Laravel and PHP Programming.