Title: Typesense for Static WordPress
Last modified: April 8, 2026

---

# Typesense for Static WordPress

 *  [James Joseph Finn](https://wordpress.org/support/users/jamesjosephfinn/)
 * (@jamesjosephfinn)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/typesense-for-static-wordpress/)
 * This plugin is a gem of a gift to the WordPress community. Embedding a modern
   and performant search interface into your website couldn’t possibly be easier.
 * The plugin uses the Algolia open-source vanilla JS libraries “InstantSearch.js”
   and “Autocomplete.js”, which communicate with your Typesense server using fetch
   requests in the browser; no connection to WordPress needed, and thus fully compatible
   with static generation.
 * Via their WP-Admin GUI, the software indexes your WP posts and pages as Typesense“
   documents” and “collections”; while the frontend search interface `fetch`es data
   direct from your Typesense instance.
 * I used the Typesense provided Docker image to spin up a self-hosted instance;
   added my instance API keys to the Typesense plugin settings in WP-Admin; indexed
   4000+ posts in a couple minutes; added the default shortcode to a test page; 
   ran a SimplyStatic export, and voilà, it works splendidly!
 * **Important note for static site generation:** Prior to running an index, you’ll
   need to filter the permalink; otherwise the search results will link to your 
   WP:
 *     ```wp-block-code
       /** * Filter Typesense document data before it is indexed.**/add_filter( 'cm_typesense_data_before_entry', function( $formatted_data, $raw_data, $object_id ) {    if ( isset( $formatted_data['permalink'] ) ) {        $formatted_data['permalink'] = str_replace(            'wp[dot]example[dot]com',            'example[dot]com',            $formatted_data['permalink']        );    }    return $formatted_data;}, 10, 3 );
       ```
   
 * **\***WordPress[dot]org doesn’t permit URLs in reviews, hence why the `[dot]`
   chicanery in the above snippet.
 * Pax et bonum.

The topic ‘Typesense for Static WordPress’ is closed to new replies.

 * ![](https://ps.w.org/search-with-typesense/assets/icon-256x256.png?rev=3095079)
 * [Search with Typesense](https://wordpress.org/plugins/search-with-typesense/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-with-typesense/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-with-typesense/)
 * [Active Topics](https://wordpress.org/support/plugin/search-with-typesense/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-with-typesense/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-with-typesense/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [James Joseph Finn](https://wordpress.org/support/users/jamesjosephfinn/)
 * Last activity: [7 months, 2 weeks ago](https://wordpress.org/support/topic/typesense-for-static-wordpress/)