Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:lscwp:troubleshooting:general [2018/07/19 15:36]
Lisa Clarke [Why crawler failed to generate file] Proofreading
litespeed_wiki:cache:lscwp:troubleshooting:general [2020/11/14 15:43] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== General Troubleshooting Guide For LSCWP ====== +~~REDIRECT>​https://​docs.litespeedtech.com/​lscache/​lscwp/​troubleshoot/~~
- +
-Here are a few common issues and how to deal with them. Please follow these steps first before logging any ticket with us since your issue might have been resolved.  +
- +
-===== Are you still using an old version of LSWCP? ===== +
- +
-Our LSWCP plugin has been developed at a very fast pace. Some compatibility issue with other plugins/or break message may have already been fixed in the latest version. ​ You should always upgrade to the latest version and advice us which LSWCP you are using. +
- +
-===== Image optimization problem? ===== +
-Please check out [[litespeed_wiki:​cache:​lscwp:​troubleshooting:​image_optimize_error|image optimization guide]] first to resove your issue.  +
- +
-  +
-    +
-===== Logged-in Users Appearing as Logged-out ===== +
- +
-This problem is caused when using multiple web applications under a single domain. You can find more information on this issue and how to resolve it in our [[litespeed_wiki:​cache:​common:​logged-in-cookie-conflicts|Handling Logged-in Cookie Conflicts page]]. +
- +
-===== Page Content Not Updating Correctly ===== +
- +
-If your site uses a plugin that updates the content of a page without editing/​saving that page, such as a "​like"​ button that updates a counter when pressed using ajax, LSCache will not be made aware that the page should be purged from cache. As long as the now outdated copy of the page is still in cache and being served, it will appear like these changes never happened. +
- +
-To fix this, you can add our ''​LiteSpeed_Cache_API::​purge_post($id)''​ [[litespeed_wiki:​cache:​lscwp:​api#​functions|API call]] to the offending plugin to have it notify LSCache that the page should be purged. +
- +
-==== Testing ====   +
-  - Purge the cache and with the inspector open (right click page -Inspect) access the page as a guest/​non-logged in user. +
-  - In the inspector, click into the Network tab and select the page request - this is usually the first entry. With this selected, click the Header tab and check that the Response Header does not contain "​X-LiteSpeed-Cache:​ hit"​. +
-  - (If your plugin updates on each visit, skip this step) Refresh the page. You should now see "​X-LiteSpeed-Cache:​ hit" in your response header. This indicates that the page was served from cache. +
-  - Trigger your plugin and make sure that the page is updated as expected. +
-  - Refresh the page one last time. "​X-LiteSpeed-Cache:​ hit" should once again be gone from the Response Header and the page should still contain the updated information.  +
- +
-===== Scheduled Posts Not Publishing On Time ===== +
-Scheduled Posts are published in WordPress through a WP cron job. Normally, WordPress triggers the cron job each time a request hits the backend. The backend is rarely hit, however, when using a cache, which causes scheduled posts to publish late. +
- +
-LSCWP will correctly purge the cache when a scheduled post is published in the cron job. All you need to do is make sure that you can reliably hit the backend. This can be done by scheduling a cron job to hit wp-cron.php at your ideal interval. +
- +
-For Example, to update scheduled posts every 15 minutes: +
-<​code>​ +
-*/15 * * * * wget http://​your_wp_site/​wp-cron.php +
-</​code>​ +
- +
-When using a server level cron job, WordPress suggests defining DISABLE_WP_CRON in your wp-config file to disable checking wp-cron on a backend hit. +
-<​code>​ +
-define('​DISABLE_WP_CRON',​ true); +
-</​code>​ +
-This may be useful in reducing the number of calls made to wp-cron if that is desired. +
- +
-[[https://blog.litespeedtech.com/​2017/​05/​17/​wpw-using-lscache-for-wp-with-scheduled-posts/|For a more in-depth discussion of this issue, see our blog.]] +
- +
-===== Some CSS Files Not Properly Reloaded After Update ===== +
-Most likely, this is not an LSCache issue, since LSCWP doesn'​t cache static files. +
- +
-If your theme'​s CSS is not properly loaded after an update, check your browser cache. Does the reload work? Do you have a CDN or a reverse proxy in front of your webserver, such as CloudFlare? These caching mechanisms may need to be purged. See [[https://​www.litespeedtech.com/​support/​forum/​threads/​wordpress-css-not-reloading.15588/#​post-99620|this forum post]] for more details. +
- +
-===== Crawler Fails to Generate Sitemap File ===== +
-If you generate a sitemap but notice that the crawler **Size** is still ''​1''​ or ''​2'',​ you can try the following steps to debug the issue. +
- +
-{{:​litespeed_wiki:​cache:​lscwp:​troubleshooting:​sitemap.png?​800|}} +
- +
-  - Verify that the sitemap URL works. +
-  - Verify that the URLs within the sitemap are available for public visit. +
-    - If the URLs are only private, that can cause a sitemap generation issue. +
-  - Verify ''​/wp-content/plugins/​litespeed-cache/​var/​crawlermap*.data''​ exists. +
-    - If it doesn'​t exist, there may be a permission issue with one of the directories in the path. +
-  - Verify that the [[litespeed_wiki:​cache:​lscwp:​environment-report|environment]] ''​home_url''​ is identical to the home URL in Step 2. Keep in mind that ''<​nowiki>​http://​example.com/​test.html</​nowiki>''​ and ''<​nowiki>​https://​example.com/​test.html</​nowiki>''​ are different! +
-    - Fix by changing **LiteSpeed Cache > Settings > General > Site Address (URL)** to match the value in the sitemap. +
- +
  • Admin
  • Last modified: 2018/07/19 15:36
  • by Lisa Clarke