How to install and configure LiteMage
This article describes how to install and configure LiteMage, the caching solution for Magento on Turbo servers. Follow the procedures in the section below for your version of Magento.
LiteMage requires the Ultra VPS License with LiteMage server license to function correctly. For Managed VPS, this license is only available for Soar 16 and Soar 32 Turbo servers. You cannot run LiteMage on Soar 8 or Takeoff Managed VPS servers.
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:
php bin/magento deploy:mode:set developer
To download the LiteMage plugin files, type the following command:
wget https://github.com/litespeedtech/magento2-LiteSpeed_LiteMage/archive/master.zip
To extract the files in the .zip file, type the following command:
unzip master.zip
To create a directory for the LiteMage plugin files, type the following command:
mkdir -p app/code/Litespeed/Litemage
You must create this directory path relative to the Magento 2 root directory. Otherwise, Magento cannot detect that the plugin is installed.
To move the unpacked LiteMage plugin files to the new directory, type the following command:
mv magento2-LiteSpeed_LiteMage-master/* app/code/Litespeed/Litemage/
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 -R username:username * , where username represents your account username.
To enable the LiteMage plugin, type the following command:
php bin/magento module:enable Litespeed_Litemage
To make the plugin settings available to the Magento Admin panel, type the following command:
php bin/magento setup:upgrade
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:
php bin/magento setup:di:compile
Alternatively, if you are running Magento version 2.0.5 or earlier or have multiple Magento stores, type the following command:
php bin/magento setup:di:compile-multi-tenant
To set Magento back to production mode, type the following command:
php bin/magento deploy:mode:set production
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:
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.
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:
- 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.
If you currently have compilation enabled, you must disable it. To do this, on the top menu bar click System, click Tools, and then click Compilation. Click Disable at the top right.
- 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.
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.
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.
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:
X-LiteSpeed-Cache: hit,litemage
Alternatively, if you see the following header, refresh the page and check again:
X-LiteSpeed-Cache: miss,litemage