# Optimize Speed

### Overview

In order to improve the pageability as well as the user experience, we have created Optimize Speed module.

### How to Use

You can easily setup Optimize Speed in Admin panel.

### How to Configure

Login to your backend page.

#### 1. Enable Lazy JavaScript

<mark style="color:red;">`BLUESKYTECHCO > Theme Settings`</mark>

![](https://1242906408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXrqfpQ0UM92vks6wPvh%2Fuploads%2FzKykArT8fAN8PzZ045Vm%2Fenable_lazy_java.png?alt=media\&token=7c5e7f1e-a605-4f26-8e28-6169523b6187)

* In the **Lazy JavaScript** field: Select **Enable**

Click **Save Config** to save your config.

#### 2. Disable Debug Mode

<mark style="color:blue;"><mark style="color:red;background-color:red;"><mark style="color:orange;">`BLUESKYTECHCO > Theme Design`<mark style="color:orange;"><mark style="color:red;background-color:red;"></mark>

![](https://1242906408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXrqfpQ0UM92vks6wPvh%2Fuploads%2F8k66EaEjZrL1zt1c7SFK%2Fbebug_mode.png?alt=media\&token=5ce5bbe3-e282-4291-8eaa-f7a45d882e58)

* In the **Disable Debug Mode** field: Select **Yes**

Click **Save Config** to save your config.

#### 3. Enable Flat Categories and Products

<mark style="color:red;background-color:red;">`STORES > Configuration > Catalog > Storefront`</mark><br>

![](https://1242906408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXrqfpQ0UM92vks6wPvh%2Fuploads%2F5cgPcykp2xkHAsK8wm9j%2Foptimize_js_css.png?alt=media\&token=d44bda77-750e-4e38-8f40-ba2edd680111)

* In the **Merge JavaScript Files** field: Select **Yes**
* In the **Minify JavaScript Files** field: Select **Yes**
* In the **Move JS code to the bottom of the page** field: Select **Yes**
* In the **Merge CSS Files** field: Select **Yes**
* In the **Minify CSS Files** field: Select **Yes**

Click **Save Config** to save your config.

#### 5. Set Production Mode

Go to SSH on server and cd to root magento and run commandlines below:

* php bin/magento cache:flush
* php bin/magento indexer:reindex
* php bin/magento setup:upgrade
* php bin/magento deploy:mode:set production
* chmod -R 777 var pub generated (if you use linux)

Copyright © 2022 [Blueskytechco.com](https://blueskytechco.com/). All Rights Reserved.
