I was talking to my friend Ajay Dsouza about finances, and somehow the conversation landed on GitBook. He asked how much I was paying, and I was paying a lot: over $100 a month. He mentioned he had a knowledge-base plugin, and I grew immediately skeptical.
You see, before I landed on GitBook, I tried several free and commercial knowledge-base products to self-host them. None of them fit my bill. They were either too light on features, didn’t support multiple products, or both.
I was already using his pro plugin, Contextual Related Posts, and he encouraged me to try his knowledge base plugin. He claimed it supported multiple products natively, would sync content from GitHub, and had a super flexible permalink structure. He granted me a one-year license to try it out, and boy, was I in for reverse sticker shock. After trying out his plugin for several days, I immediately archived my GitBook content and canceled the (very) expensive plan I was on. I was hooked.
Let’s go over what pushed me to switch to a WordPress-native knowledge base plugin instead of an expensive GitBook SaaS to host my documentation. This review will cover Knowledge Base Pro, its quirks, and what I enjoy about it.
What I Want in a Knowledge Base Plugin
The short answer is: support for multiple products. Almost every available WordPress plugin I tried either had multiple products baked in as an afterthought, didn’t support them at all, or required a Multisite installation.
Here’s a quick list of what I looked for that I only found available in GitBook:
- Multiple products that work natively with the platform.
- Ability to customize the domain used for the docs.
- Flexible and sane permalinks.
- GitHub integration and the ability to sync documentation hosted there onto the platform (and away from it if necessary).
- Intuitive documentation hierarchy. I should be able to switch products quickly.
- A pleasant experience for the end user (the reader of the documentation).
- Reliable and useful search capabilities.
- Reasonable subscription costs.
- Ownership and data portability of the knowledge base content.
- Statistics and integration with newsletter providers.
In all of the above categories, GitBook is a real winner, which is why Knowledge Base Pro had me extremely skeptical about its capabilities. I felt like I had “tried them all.” There’s no way a $70 plugin could compete. I was wrong.
Getting Started With Knowledge Base Pro
To ease my skepticism, Ajay offered a year-long trial of his plugin on one of my documentation sites. I spun up a subdomain, installed WordPress, and began exporting content from GitBook into a GitHub repository I owned.
I admit I needed Ajay’s help to set up permalinks the way I wanted. I had a base domain where I wanted the product cards on the site’s homepage. By default, the plugin would like a permalink home for its knowledge base. Thankfully, leaving the “Knowledge Base Slug” blank was the trick.
With a permalink structure set up, I began moving three of my documentation sites from GitBook to GitHub. Thankfully, GitBook is generous and lets you export your existing data into a GitHub repository, even if you’re not paying the monthly fee.
GitHub Sync: The Gap Between GitHub and WordPress
Once my GitHub repo was set up, I cloned it locally and added an AI agent to inject the necessary frontmatter that Knowledge Base Pro requires.
Here was my prompt for my AI agent:
The agent would then scan all my .md files, strip or modify the frontmatter GitBook has, and inject new ones.
Some steps were more manual, such as pruning GitBook’s notices, which aren’t portable and have to be recreated. Other frontmatter quirks include images and internal links, which needed updating after import. I could’ve been doing this step wrong, but I found setting article relationships and images after the import to be the biggest time sink.
Armed with my GitHub repo, I then created a personal access token and gave Knowledge Base Pro access to my repos that held the docs. I only wanted a one-way sync: slurp all my GitHub content into the plugin. I figured I could take ownership after that since I was using the block editor.
Knowledge Base Pro supports two-way syncing, but I found that going from Markdown to the block editor and back didn’t work well with the format. I was fine with this, as I wanted only a one-way sync. However, if you need it synced back to Markdown, I was never able to figure out how to do that with block editor content.
After import, the articles, sections, and tags are imported and saved automatically. The first instinct, besides editing them, was to be able to sort them on the frontend. GitBook makes this super simple, but luckily, three WordPress plugins tackle this problem expertly, and they’re linked below.
After sorting, I had to install a simple mu-plugin to make sure Knowledge Base Pro was set up correctly with the plugins above.
<?php
// Install these sorting plugins:
// https://wordpress.org/plugins/metronet-reorder-posts/
// https://wordpress.org/plugins/reorder-terms/
// https://wordpress.org/plugins/reorder-by-term/
// 1. In Reorder Posts, select the knowledgebase post type.
// 2. Go to Tools->Rebuild Term Data and select sections/categories and build term data
// 3. Reorder in the appropriate screens under Knowledge base -> Reorder
/**
* Reorder the query vars for the knowledge base plugin.
*/
/**
* AND-merge meta queries while preserving nested relation in $passed.
*
* @param array $base Base meta_query clauses.
* @param array $passed Passed meta_query (may include 'relation' => 'OR').
* @return array
*/
function wzkb_merge_meta_query_and( array $base, array $passed ) {
$merged = array( 'relation' => 'AND' );
foreach ( $base as $key => $clause ) {
if ( 'relation' === $key ) {
continue;
}
$merged[] = $clause;
}
if ( empty( $passed ) ) {
return $merged;
}
if ( isset( $passed['relation'] ) ) {
$merged[] = $passed;
return $merged;
}
$merged[] = $passed;
return $merged;
}
add_action( 'pre_get_posts', function ( $query ) {
if ( ! is_admin() && $query->is_tax( 'wzkb_category' ) ) {
$query->set( 'orderby', 'meta_value_num title' );
$query->set( 'order', 'ASC' );
$query->set( 'post_status', 'publish' );
$query->set( 'post_type', 'wz_knowledgebase' );
$meta_key = sprintf( '_reorder_term_wzkb_category_%s', $query->get_queried_object()->slug );
$query->set( 'meta_key', $meta_key );
$query->set( 'posts_per_page', 50 );
}
}, 50 );
add_filter(
'wzkb_fetch_terms_args',
function ( $args, $taxonomy, $query_args, $meta_query ) {
if ( ! is_admin() && 'wzkb_category' === $taxonomy ) {
$args['orderby'] = 'meta_value_num';
$args['order'] = 'ASC';
$reorder_meta_query = array(
'relation' => 'OR',
array(
'key' => 'wz_knowledgebase_order',
'compare' => 'NOT EXISTS',
),
array(
'key' => 'wz_knowledgebase_order',
'value' => 0,
'compare' => '>=',
),
);
if ( ! empty( $meta_query ) ) {
$args['meta_query'] = wzkb_merge_meta_query_and(
array( $reorder_meta_query ),
$meta_query
);
} else {
$args['meta_query'] = $reorder_meta_query;
}
$args['hide_empty'] = true;
$args['parent'] = $args['parent'] ?? 0;
}
return $args;
},
100,
4
);Code language: PHP (php)The Documentation Experience for Readers
With a self-hosted version of my multi-product knowledge base, I wanted to ensure the reader experience wasn’t impacted negatively. In other words, I wanted GitBook-like functionality on the frontend.
Thankfully Knowledge Base Pro covers this very well. Armed with the sorting I mentioned above, you can have the plugin “take over” your homepage and show cards just like GitBook does. Just be sure to set “product images” for each product, and you’re set.
Armed with my homepage cards, a user can go into each product, search the documentation, and see related entries.
The only thing missing here is being able to set a per-product sidebar. I could be missing something, but it isn’t a dealbreaker. It integrates nicely with the Blocksy theme that I use on most of my sites.
Moving Away From GitBook
Honestly, once you get a taste of quality self-hosted documentation, you don’t miss GitBook (or its pricing) at all.
Here are the reasons I ultimately chose self-hosted:
- I can use whatever domain I want without paying an extra fee.
- I can use a custom newsletter solution like Gravity Forms with MailerLite.
- I can choose which stats to track, and what tracks it (I use Pirsch Analytics).
- I can customize the appearance via CSS, something not possible on a hosted platform.
What ultimately led me away from GitBook was pricing. I had a lot of open-source products, but I still paid for documentation hosting because I wanted my own domain.
What Could Be Improved
Knowledge Base Pro is an extremely polished product; don’t get me wrong. There are some things I wish could be improved.
- Syncing images, Markdown links via GitHub: I found most links still pointing to
.mdfiles, so I had to clean all those up. I also couldn’t find an elegant way to import my images (and image references). - Sorting: I wish this were built-in to save me from installing three separate plugins (albeit add-ons).
- Related Posts: If you could somehow marry this plugin with Contextual Related Posts, it would be an epic addition.
- Per-product sidebars: I wish this product could have multiple sidebars, one for each product, with widgets/blocks to go with it.
Wrapping Up
Here are my final thoughts on both GitBook and Knowledge Base Pro in table form.
| Feature | GitBook | Knowledge Base Pro |
|---|---|---|
| Hosting | SaaS | Self-hosted WordPress |
| Multiple products | Built-in | Native self-hosted support |
| GitHub synchronization | Two-Way Sync | Two-Way Sync |
| Content storage | Hosted platform | WordPress |
| Permalink flexibility | Flexible | Extremely Customizable |
| Design control | Platform-dependent | WordPress-dependent |
| Infrastructure maintenance | Managed | Your responsibility |
| Pricing model | Monthly SaaS | Annual plugin license |
Final Thoughts and Conclusion
I wish there were a world where I could keep paying GitBook, but after being able to do the exact same thing in a self-hosted solution, there’s honestly no looking back.
Knowledge Base Pro is a solid plugin with many well-thought-out features to make self-hosting a dream come true.
At the beginning of the journey, I wanted a cheaper solution than GitBook; I found it in Knowledge Base Pro.














