Bagisto Performance Optimization Guide

Updated 25 June 2020

Performance Optimization is a measure of how good is the loading and display of your website pages and their elements. Bagisto’s libraries, packages, and architecture easily build stunning websites using well-written, structured code.

Therefore, Efficiency and optimization measure the success of the application. In that sense, ensuring the high performance of the Bagisto web application is critical. Nothing in this world is perfect enough! Even without clouds the sky’s incomplete. In the same way, to increase the performance, Bagisto requires optimization.

So, let’s discuss how Bagisto Raises the bar for phenomenal Performance Optimization

Here are some of the measures that will improve the website’s speed and performance and make it secure than ever before. So just start optimizing by following these simple steps :

Upgrade your Bagisto Ecommerce to the latest version regularly

Updates can usually provides bug fixes, performance enhancements and a new stack of out of the box features. The more functionality you get from the Bagisto, the less extensions and plugins you need to install later. So, always remember to run the latest version of Bagisto. You can check updates by using this link.

Hardware and Software Requirements

OS – Ubuntu 16.04 LTS or Higher / Windows 7 or Higher (WAMP / XAMPP), SERVER – Apache 2 or NGINX , RAM – 2 GB or Higher, Minimum 2 Core CPU , PHP – 7.2 or Higher, Processor – Clock Cycle 1Ghz or Higher, Mysql – 5.7.23 or Higher, For MariaDB users – 10.2.7 or Higher ,Node – 8.11.3 LTS or Higher, Composer – 1.6.5 or Higher. This configuration is recommended for the optimal installation of the Bagisto Platform.

Image Optimization

Ecommerce sites are usually loaded with images and videos, so image optimization is essential to speed up your shop frontend. Before uploading to your website, you can use PhotoShop, or any other tool to compact images.

Minification of Assets (JSS, CSS , HTML, images and so on)

Compiling all properties in one location might end up with an enormous file size. Consequently, this practice will not allow bagisto application to take advantage of the proposed compilation. So to solve this problem, we can use the Laravel Mix to minify assets like JSS, CSS , HTML, images ,and many more. This will perform all Mix tasks and ensure that by minifying them, assets are production-ready. Once minified, the assets will become smaller in size, resulting in faster retrieval, which will improve the Bagisto application performance.

CDN Implementation to Deliver Static Assets

Loading files of static assets from CDN server (Content Delivery Network) boosts the performance of bagisto. Whenever someone visits a site, they serve information from the nearest CDN area. That basically loads the web page faster and offers high performance. This implies that you must characterize the static resources on a specific application (JS, CSS , HTML, pictures , recordings, and liveliness, and so forth). As now, Bagisto supports cloudflare CDN.

Lazy Loading

Bagisto uses Eloquent ORM that easily maps your all object models to the database tables. There’s one downside to it, it’s that the solution is still lazy loading while Eloquent treats the interactions in the database. Eloquent never gets the data back unless referenced elsewhere in the code. While having extra queries may look harmless, the queries increase the data, and additional data decreases performance. Set queries instead to “Lazy loading,” so that any associated object models can be retrieved upon a query call.

Serving Scaled Images

Serving suitably sized images can save several bytes of data and boost your website’s performance, especially on low-powered (e.g. mobile) device.

Upgrade to latest Compatible PHP Version (we use PHP 7.2 as a higher version)

Bagisto is powered by an engine called the PHP interpreter. PHP7 is the latest version nowdays, that runs more faster than the previous PHP 5 version. If you use the new update ask your system administrator. If not, upgrade to deliver performance boost to your online shop.

Apache compression (Gzip and Deflate)

Apache actually has two compression options:

mod_deflate is easier to set up and is standard. mod_gzip seems more powerful: you can pre-compress content. Deflate is quick and works, so we use it; use mod_gzip if that floats your boat. In either case, Apache checks if the browser sent the “Accept-encoding” header and returns the compressed or regular version of the file. However, some older browsers may have trouble (more below) and there are special directives you can add to correct this. By enabling this, the performance optimization of the website is simple to incorporate and can make a significant difference.

Leverage Browser Caching

Generally specifying how long web browsers should keep images, CSS and JS stored locally means you can leverage your browser’s caching. Thus the user’s browser will download fewer data while navigating through your pages, which will improve your website’s loading speed. You can implement leverage browser caching for Apache servers by adding a small snippet to the .htaccess file.

Enhance Artisan Code Command by using Config and Routes Caching

The Artisan code command in Laravel allows you to perform most of those repetitive and tedious programming tasks that most developers of web applications avoid doing manually. You can cache the Config by the mentioned command: php artisan config:cache   , the basic usage of this command is that the changes you make will have no effect. Use the following command to clear the Config cache: php artisan config:clear  . Routes caching is an essential feature of optimization, especially for applications with many routes and configuration. The cache for routes is a simple array and helps speed up Laravel performance due to faster array loading. To do this, execute the following command: php artisan route:cache  . Remember to run the command whenever the config files are updated or the routes are modified. Otherwise, old changes will be loaded from Laravel and the cache. Use the below command to clear the cache: php artisan route:clear  .

Error Detail

The amount of error detail your application displays through the browser is controlled by the app.debug configuration option in your config/app.php configuration file. By default, this configuration option is set to respect the APP_DEBUG environment variable, which is stored in your .env file.

For local development, you should set the APP_DEBUG environment variable to true. In your production environment, this value should always be false.

Database optimization

And last but not least is optimization of the database. There are always some content available that needs to be optimized whether it is cleaning up old unused tables or building indexes for quicker entry.


A typical user expects to load web pages in seconds. If you are unable to fulfill this condition, you will lose a lots of website’s traffic and as a consequence, your profit. By implementing all of the aforementioned tips, you can optimize Bagisto performance that provide the business with greater speed, security and reliability.


In case of any help, query, or feedback please contact us or raise a ticket.


Thank you for reading this article,

Keep in touch!!



. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • alexbeglov1989
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home