PostgreSQL guides for WordPress & WooCommerce

How to (Easily) Configure PostgreSQL (AI vector search) on WordPress

You can add AI-powered search to your WordPress site using WPSOLR together with PostgreSQL vector search. PostgreSQL Vector search stack for WPSOLR You can install our fully functional PostgreSQL vector search stack from GitHub, ready to work with WPSOLR. ⚠️ PHP ext-pgsql required  This stack requires the PHP pgsql extension (ext-pgsql) to connect to PostgreSQL using pg_connect(). If the extension is missing, you may see errors like: Call to undefined function pg_connect() ✅ Check if pgsql is installed php -m | grep pgsql You should see: pgsql PostgreSQL Vector Search PostgreSQL, with the pgvector extension, can store embeddings—numerical representations of text or images produced by AI models. These embeddings allow you to perform vector-based searches, where results are matched based on meaning or similarity rather

PostgreSQL can explain complex queries like vector reranked with BM25 RRF

Vector search with BM25 reranking (RRF – Reciprocal Rank Fusion), filters, and facets can become complex very quickly: * You’re combining multiple rankings (e.g., BM25 + vector similarity). * You’re applying post-filtering or pre-filtering (categories, availability, dates, etc.). * You’re computing facets/aggregations on top of already-ranked results. * And sometimes you’re adding re-sorting (e.g., by date or popularity after relevance). That’s where PostgreSQL really shines. With `EXPLAIN (ANALYZE, BUFFERS)` you can: * See whether your vector index (IVFFlat / HNSW) is actually used. * Check if filters are applied before or after similarity search. * Detect expensive bitmap heap scans or unnecessary sequential scans. * Measure the real cost of CTEs vs. subqueries. * Understand how RRF is materialized (temporary sort, window function, hash aggregation).