Laravel: Boost performance on production

Posted by Rukmi Patel | September 4, 2017

When we deploy laravel application on production, performace of an application becomes highest priority. Real users are going to use application and site may loose interest if it takes time to respond to users’ requests.

Laravel offers many optimization methods for cache optimization, query optimization, server tweaking etc. But in this blog, I will outline available methods in Laravel itself for better performance.

Disable Unused Service

Many times it happens that we don’t require to load all services when Laravel bootstraps. We can simply disable services which are not in use from config/app.php. We recommend to test full site to make sure everything works even after disabling un-used services.


Artisan Command to improve performance.

We all know Laravel comes with powerfull command line tool called “artisan”. We can use available artisan command to boost site’s performance.

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

This is useful when site consists lots of routes, configuration. This commands will just create a plain array from available configurations. This will be faster because Laravel does not require to load real objects after running above commands.

Please make sure to run above commands again as Laravel will be loading all content from cache and it will not find changes until we ru-run these commands again!

Add a comment

*Please complete all fields correctly

Related Blogs

Posted by Rukmi Patel | December 2, 2019
iTreeni Technolabs Outshines at GoodFirms by Providing End-To-End Business Solutions
Empowering clients' business by leveraging technology-enabled solutions endows iTreeni Technolabs to tap into the list of top web development companies in Australia at GoodFirms. View iTreeni Technolabs' GoodFirms' profile to...
MEAN-Vs-Full-stack
Posted by Rukmi Patel | April 9, 2019
Comparing Full Stack V/S MEAN Stack approach
The web and mobile app development services have stepped up to next level in last 5 years. Web and apps are all built utilizing a ‘stack’ of various technologies like...
Posted by Rukmi Patel | September 6, 2018
Headless Drupal or DeCoupled Drupal
Now a days, front-end technologies like Angular, React.js, Backbone.js etc have started attracting audience because of its advantages over traditional rendering approach. Server side frameworks like Laravel, Node.js have already...