Magento 2
First you must install LiteMage, and then activate it in the Magento administration panel.Installing LiteMage
To install LiteMage on Magento 2, follow these steps:- Access your account using SSH.
-
Change to the directory where Magento is installed. For example, type
cd ~/public_html/magento. - At the command prompt, to set Magento to developer mode, type the following command:
- To download the LiteMage plugin files, type the following command:
- To extract the files in the .zip file, type the following command:
- To create a directory for the LiteMage plugin files, type the following command:
- To move the unpacked LiteMage plugin files to the new directory, type the following command:
After you move the files, make sure that they have the same ownership as all of the other Magento files. If they do not, use the chown command to set the correct ownership. For example, you can type chown -Rusername:username* , where username represents your account username.
- To enable the LiteMage plugin, type the following command:
- To make the plugin settings available to the Magento Admin panel, type the following command:
- To recompile Magento, type one of the following commands:
- If you are running Magento version 2.0.6 or later and have only one Magento store, type the following command:
- Alternatively, if you are running Magento version 2.0.5 or earlier or have multiple Magento stores, type the following command:
- To set Magento back to production mode, type the following command:
If you receive an error message running this command, repeat step 10, and then try again.
- Using the cPanel File Manager or the SSH command prompt, open the .htaccess file in the Magento root directory in your preferred text editor, and then:
- Copy the following text and paste it at the top of the .htaccess file:
- Save your changes to the .htaccess file.
Activating LiteMage
To activate LiteMage on Magento 2, follow these steps:- Log in to Magento as the administrator.
- In the left sidebar, click STORES, and then click Configuration.
- Click ADVANCED, and then click System.
- Click Full Page Cache.
- In the Caching Application list box, confirm that LiteMage Cache within LiteSpeed Server is selected. If LiteMage Cache within LiteSpeed Server is not selected, select it in the Caching Application list box, and then click Save Config.
- In the left sidebar, click SYSTEM, and then click Cache Management.
- Select the Configuration and Page Cache check boxes.
-
In the list box above the table, select Refresh, and then click Submit.
π Tip To verify that the LiteMage installation is working correctly, follow the Verifying LiteMage procedure below.
Magento 1
First you must download and install LiteMage, and then activate it in the Magento administration panel.Downloading and installing LiteMage
To download and install LiteMage on Magento 1, follow these steps:- Download the LiteMage package file to your local computer. To do this, go to https://www.litespeedtech.com/products/cache-plugins/magento-acceleration/download. Under Step 3, download the latest file for Magento 1.x.
- Using the cPanel File Manager or the SSH command prompt, on the web server open the .htaccess file in the Magento root directory in your preferred text editor, and then:
- Copy the following text and paste it at the top of the .htaccess file:
- Save your changes to the .htaccess file.
- Log in to Magento as the administrator.
- On the top menu bar, click System, and then click Configuration.
- In the left sidebar, under GENERAL, click Web.
- Click Session Validation Settings, and then in the Use SID on Frontend list box, select No, and then click Save Config.
- On the top menu bar, click System, click Magento Connect, and then click Magento Connect Manager. This step takes you away from the administrator interface and you must type the Magento administrator username and password again.
- Under Direct package file upload, next to Upload package file, click Choose File.
- Select the location where you downloaded the package file in step 1, and then click Upload.
Activating LiteMage
To activate LiteMage on Magento 1, follow these steps:- Log in to Magento as the administrator.
- On the top menu bar, click System, and then click Configuration.
-
In the left sidebar, under LITEMAGE CACHE, click LiteMage Configuration.
π Note If you receive a 404 Not Found error message, log out of Magento and then log back in.
- Click General Settings, and then in the Enable LiteMage Cache list box, select Yes.
- Click Save Config.
- On the top menu bar, click System, and then click Cache Management.
-
Under Cache Storage Management, select the Configuration check box, and then click Submit. This refreshes the configuration cache.
π Tip To verify that the LiteMage installation is working correctly, follow the Verifying LiteMage procedure below.
Verifying LiteMage
To ensure that LiteMage is working correctly for your site, follow these steps:- Use your web browser to visit a page that is cache-enabled.
-
Open the web browser inspector by right-clicking the page, and then click Inspect.
π Note The exact wording for the Inspect option, as well as the options in the following steps, may vary depending on the browser you are using.
- Select the Network tab, and then refresh the page.
- Select the item from the list that corresponds to the current HTML page (this is usually the first item ending in .html ).
- Under Headers, if you see the following response header, then LiteMage is working correctly:
Alternatively, if you see the following header, refresh the page and check again:
More information
- For general information about LiteMage, please visit https://www.litespeedtech.com/solutions/magento-acceleration.