This is an old revision of the document!
LiteSpeed Cache for Prestashop: Crawler
The crawler travels through your site, refreshing pages that have expired in the cache. This makes it less likely that your visitors will encounter un-cached pages.
Before You Begin
- Install and enable LiteSpeed Cache for Prestashop
- Crawler Engine: The crawler must be enabled at the server level, or you will see the warning message
Server crawler engine not enabled. Please check….
. If you are using a shared hosting server, please contact your hosting provider, or see our instructions. - SiteMap: Prepare your site's sitemap, e.g.
http://prestashop-123/456_sitemap.xml
How to Use Crawl script
DownLoad from here
Change permission able to executive
chmod +x cachecrawler.sh
Crawl Desktop&mobile share same View
sh cachecrawler.sh SITE-MAP-URL
Crawl Desktop&Mobile save different Views
sh cachecrawler.sh SITE-MAP-URL -m
By default, in the Prestashop cache plugin Mobile View is DISABLED. To enable mobile view, navigate to PrestaShop Admin → LiteSpeed Cache → Configuration and set Separate Mobile View to Yes
More Options
- To get help:
sh cachecrawler.sh -h
- To change default interval request from 0.1s to custom NUM value:
sh cachecrawler.sh SITE-MAP-URL -i NUM
How to Generate a Sitemap
The Google Sitemap module is quite popular for generating a sitemap in Prestashop, and it's much faster than online generation.
Google Sitemap Module
For v1.6, Google Sitemap Module is installed by default.
For v1.7+, Google Sitemap Module needs to be installed from source first.
Download gsitemap; then change the file name to gsitemap.zip
.
Click the Configure button, then click xxx.sitemap.xml
(This is your SITE-MAP-URL).
SiteMap Online Generator
One of the popular sitemap generators is XML-Sitemaps.com After the crawl is finished. Click DOWNLOAD YOUR XML SITEMAP FILE and put it where the crawler script can access it.
How to Verify
By using the browser developer tool, you should see X-LiteSpeed-Cache: hit
at the first view for both desktop and Mobile