Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
litespeed_wiki:cache:lscwp:simucrawler [2018/09/06 19:39] Eric Leu created |
litespeed_wiki:cache:lscwp:simucrawler [2018/09/06 20:58] (current) Lisa Clarke Proofreading |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== LiteSpeed Cache for WordPress: Simulate Crawler ====== | + | ====== LiteSpeed Cache for WordPress: Simulate Roles in Crawler ====== |
- | LSCache use [[https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:crawler | Guest view by default crawler]]. The Simulate crawler travels through your site by different user view. This helps for different permission of users visit cached pages. | + | LSCache uses [[https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:crawler | Guest View]] by default, which means that it crawls from the point of view of a non-logged-in user. It is possible to simulate additional user roles in the crawler, which is useful if you have a site where the logged-in view differs from the logged-out view, or there are multiple different views based on user role. |
- | =====How to setup ===== | + | =====How to Set it Up ===== |
- | ===== Get User ID===== | + | ==== Get User ID==== |
- | You can click edit in user in Wordpress - > users -> Username. You will see the URL contains "user_id=XXX" this number is the users ID. \\ | + | To simulate the experience of a particular user role, you will need to find a user that has that role and get their userid. For example, if you want to crawl an Editor view, find a user who is listed as an Editor, and find their userid. |
- | {{:litespeed_wiki:cache:lscwp:simu-1.png?400|}} \\ | + | |
- | For more User ID get methods, please see [[https://rudrastyh.com/wordpress/get-user-id.html | 7 methods to get User ID]] | + | |
- | ===== Add User ID to Role Similation===== | + | |
- | Assume we get a User ID is "3". Then we set 3 in the LSCache -> Settings -> Crawler -> Role Simulation | + | |
- | {{:litespeed_wiki:cache:lscwp:simu-5.png?700|}} | + | |
- | ===== Getting Ready to Run===== | + | There are several ways to find a WP userid. One way is to navigate to **Wordpress Dashboard > Users**, and hover over the ''Edit'' link next to a user's gravatar. The URL that displays on the bottom left of the browser screen will contain a string that looks like ''?user_id=XXX'', where ''XXX'' is the userid. |
- | Follow crawler [[https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:crawler#getting_ready_to_run | Start run]] to start | + | {{:litespeed_wiki:cache:lscwp:simu-1.png?400|}} |
- | + | ||
- | In this page, you will also see there's Guest and Editor items to crawl | + | |
- | + | ||
- | {{:litespeed_wiki:cache:lscwp:simu-4.png?700|}} | + | |
+ | Please see [[https://rudrastyh.com/wordpress/get-user-id.html | 7 methods to get User ID]], if you want to try another way. | ||
+ | ==== Add User ID to Role Simulation==== | ||
+ | Assume we get a userid of **3**. Then we enter ''3'' in the **LiteSpeed Cache > Settings > Crawler > Role Simulation** box. | ||
+ | {{:litespeed_wiki:cache:lscwp:simu-5.png?700|}} | ||
+ | If you want to crawl additional roles, enter more userids, one per line. | ||
+ | ===== Start Crawling ===== | ||
+ | Follow the original [[https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:crawler#getting_ready_to_run | Getting Ready to Run instructions]], to generate a crawler file and start crawling. | ||
+ | In our example, you will see there are two roles to crawl: Guest and Editor | ||
+ | {{:litespeed_wiki:cache:lscwp:simu-4.png?700|}} | ||