APSearch — Arabic & Persian Search

APSearch — Arabic & Persian Search

By Faiz
Details
View on WordPress

WordPress search fails on Arabic-script languages, and it fails silently. A visitor searches کتابها and gets nothing, because the post says کتاب‌ها with a zero-width non-joiner. Someone types كتاب with an Arabic Kaf while the content uses the Persian ک. A product title carries diacritics; the query does not. Every one of these is a lost search, a lost reader, and in a shop, a lost sale.

This plugin fixes it by keeping a normalized copy of your searchable text and matching queries against that copy.

What it normalizes

  • Yeh family: ي, ى, ئ, ے, ې ی
  • Kaf family: ك, ڪ ک
  • Alef family: أ, إ, آ, ٱ ا
  • Heh family: ة, ۀ, ہ, ھ ه
  • Diacritics (harakat), Quranic marks and kashida/tatweel are ignored
  • Arabic-Indic (٠-٩) and Extended Arabic-Indic (۰-۹) digits become 0-9
  • Zero-width non-joiner (ZWNJ / نیم‌فاصله) and other invisible marks are ignored
  • Punctuation and repeated whitespace are ignored

Works with

  • The built-in search form and search results page
  • Any theme or block that runs a WP_Query search
  • WooCommerce product search (enable the product post type in settings)
  • WP-CLI: wp apsearch reindex, wp apsearch status, wp apsearch normalize "متن"

Privacy

The plugin sends nothing anywhere. It stores one normalized text field per post in your own database.

Details

Plugin code:
apsearch-arabic-persian-search
Plugin version:
0.1.0
Author:
Outdated:
No
WP version:
6.0 or higher
PHP version:
7.4 or higher
Test up to WP version:
7.1
Total installations:
0
Last updated:
2026-08-31
Rating:
Times rated:
0
arabic
farsi
persian
search
urdu