SearchWP Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP’s many hooks

Debugging

Debugging in SearchWP is meant to facilitate observing the inner workings of both the indexing process and search process. Debugging can be enabled either by:

When debugging is enabled, a log file is created (one per day) in ~/wp-content/uploads/searchwp-logs/. Much information is made available about what SearchWP is doing as it indexes and performs searches.

Note: Database queries are included in debug logs; please delete log files when you are done debugging.

Additionally when debugging is enabled an HTML comment block will be output in the source of search results pages. Information will be displayed about searches that ran for that request.

The HTML comment block will look something like this:

<!-- BEGIN SEARCHWP DEBUG
Query 1
===============
Keywords: coffee
Engine: Default
Tokens: coffee
Found Results: 6
Max Pages: 1
Query Time: 0.04037
┌───────────┬───────┬───────────────────────────────┬──────┐
│ Relevance │ ID │ Source │ Site │
├───────────┼───────┼───────────────────────────────┼──────┤
│ 561 │ 82719 │ Coffee Roasting Methods │ 1 │
│ 488 │ 837 │ The best coffee mug supplier │ 1 │
│ 122 │ 19983 │ How much coffee is too much? │ 1 │
│ 90 │ 1837 │ Brewing methods compared │ 1 │
│ 77 │ 1847 │ Best cafe in the area! │ 1 │
│ 5 │ 20012 │ Espresso machines as gifts │ 1 │
└───────────┴───────┴───────────────────────────────┴──────┘
END SEARCHWP DEBUG -->

Using both the debug log and HTML comment block output, you can gain insight into exactly what SearchWP is doing.

Create a Better WordPress Search Experience Today

Never lose visitors to unhelpful search results again. SearchWP makes creating your own smart WordPress search fast and easy.

Get SearchWP Now
Multiple Search Engines Icon