{"id":352327,"date":"2026-08-31T13:31:47","date_gmt":"2026-08-31T13:31:47","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/arabic-persian-search\/"},"modified":"2026-08-31T13:31:29","modified_gmt":"2026-08-31T13:31:29","slug":"apsearch-arabic-persian-search","status":"publish","type":"plugin","link":"https:\/\/bn.wordpress.org\/plugins\/apsearch-arabic-persian-search\/","author":16135863,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.0","stable_tag":"0.1.0","tested":"7.1","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"APSearch \u2014 Arabic & Persian Search","header_author":"Faiz Dae","header_description":"Makes WordPress search actually work for Arabic, Persian, Dari and Urdu content: normalizes Yeh\/Kaf variants, diacritics, Arabic-Indic digits and ZWNJ so users find what they search for.","assets_banners_color":"6a717d","last_updated":"2026-08-31 13:31:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/profiles.wordpress.org\/faizahmaddae","rating":0,"author_block_rating":0,"active_installs":0,"downloads":61,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1.0":{"tag":"0.1.0","author":"faizahmaddae","date":"2026-08-31 13:31:29","revision":3674336}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3674331,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3674331,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3674331,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3674331,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3674336,"resolution":"1","location":"plugin","width":1100,"height":385},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3674336,"resolution":"3","location":"plugin","width":1100,"height":345},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3674336,"resolution":"2","location":"plugin","width":1100,"height":255}},"screenshots":{"1":"Settings screen with index status.","2":"Normalization rules.","3":"The normalization test tool."}},"plugin_section":[],"plugin_tags":[1113,1261,1260,944,36466],"plugin_category":[],"plugin_contributors":[278495],"plugin_business_model":[],"class_list":["post-352327","plugin","type-plugin","status-publish","hentry","plugin_tags-arabic","plugin_tags-farsi","plugin_tags-persian","plugin_tags-search","plugin_tags-urdu","plugin_contributors-faizahmaddae","plugin_committers-faizahmaddae"],"banners":{"banner":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/assets\/banner-772x250.png?rev=3674331","banner_2x":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/assets\/banner-1544x500.png?rev=3674331","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/assets\/icon-128x128.png?rev=3674331","icon_2x":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/assets\/icon-256x256.png?rev=3674331","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/trunk\/screenshot-1.png?rev=3674336","caption":"Settings screen with index status."},{"src":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/trunk\/screenshot-2.png?rev=3674336","caption":"Normalization rules."},{"src":"https:\/\/ps.w.org\/apsearch-arabic-persian-search\/trunk\/screenshot-3.png?rev=3674336","caption":"The normalization test tool."}],"raw_content":"<!--section=description-->\n<p>WordPress search fails on Arabic-script languages, and it fails silently. A visitor searches <strong>\u06a9\u062a\u0627\u0628\u0647\u0627<\/strong> and gets nothing, because the post says <strong>\u06a9\u062a\u0627\u0628\u200c\u0647\u0627<\/strong> with a zero-width non-joiner. Someone types <strong>\u0643\u062a\u0627\u0628<\/strong> with an Arabic Kaf while the content uses the Persian <strong>\u06a9<\/strong>. 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.<\/p>\n\n<p>This plugin fixes it by keeping a normalized copy of your searchable text and matching queries against that copy.<\/p>\n\n<p><strong>What it normalizes<\/strong><\/p>\n\n<ul>\n<li>Yeh family: \u064a, \u0649, \u0626, \u06d2, \u06d0 \u2192 \u06cc<\/li>\n<li>Kaf family: \u0643, \u06aa \u2192 \u06a9<\/li>\n<li>Alef family: \u0623, \u0625, \u0622, \u0671 \u2192 \u0627<\/li>\n<li>Heh family: \u0629, \u06c0, \u06c1, \u06be \u2192 \u0647<\/li>\n<li>Diacritics (harakat), Quranic marks and kashida\/tatweel are ignored<\/li>\n<li>Arabic-Indic (\u0660-\u0669) and Extended Arabic-Indic (\u06f0-\u06f9) digits become 0-9<\/li>\n<li>Zero-width non-joiner (ZWNJ \/ \u0646\u06cc\u0645\u200c\u0641\u0627\u0635\u0644\u0647) and other invisible marks are ignored<\/li>\n<li>Punctuation and repeated whitespace are ignored<\/li>\n<\/ul>\n\n<p><strong>Works with<\/strong><\/p>\n\n<ul>\n<li>The built-in search form and search results page<\/li>\n<li>Any theme or block that runs a WP_Query search<\/li>\n<li>WooCommerce product search (enable the <code>product<\/code> post type in settings)<\/li>\n<li>WP-CLI: <code>wp apsearch reindex<\/code>, <code>wp apsearch status<\/code>, <code>wp apsearch normalize \"\u0645\u062a\u0646\"<\/code><\/li>\n<\/ul>\n\n<p><strong>Privacy<\/strong><\/p>\n\n<p>The plugin sends nothing anywhere. It stores one normalized text field per post in your own database.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>Go to <strong>Settings \u2192 APSearch<\/strong>.<\/li>\n<li>Choose which post types to index and press <strong>Build \/ rebuild index<\/strong>.<\/li>\n<li>Search your site and compare.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20to%20rebuild%20the%20index%20after%20adding%20a%20post%3F\"><h3>Do I need to rebuild the index after adding a post?<\/h3><\/dt>\n<dd><p>No. Posts are indexed automatically when saved. A full rebuild is only needed after you install the plugin or change the normalization rules.<\/p><\/dd>\n<dt id=\"does%20this%20slow%20down%20my%20site%3F\"><h3>Does this slow down my site?<\/h3><\/dt>\n<dd><p>Search adds one LEFT JOIN on a single meta row per post. Indexing happens on save, not on view.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20a%20search%20plugin%20like%20relevanssi%20or%20searchwp%3F\"><h3>Does it work with a search plugin like Relevanssi or SearchWP?<\/h3><\/dt>\n<dd><p>Those plugins replace WordPress search entirely rather than filtering it, so this plugin steps aside and your results come from them. If Relevanssi is active you will see a one-time notice in the admin saying so.<\/p>\n\n<p>You then have two choices: deactivate the other plugin and search with this one, or keep it and feed it this plugin's normalization using the snippet in the next answer.<\/p><\/dd>\n<dt id=\"how%20do%20i%20make%20relevanssi%20understand%20arabic%20and%20persian%20spelling%3F\"><h3>How do I make Relevanssi understand Arabic and Persian spelling?<\/h3><\/dt>\n<dd><p>Relevanssi stores search terms exactly as they are written, so <code>\u06a9\u062a\u0627\u0628\u200c\u0647\u0627<\/code> (with ZWNJ) and <code>\u06a9\u062a\u0627\u0628\u0647\u0627<\/code> stay different words to it, as do <code>\u0643\u062a\u0627\u0628<\/code> and <code>\u06a9\u062a\u0627\u0628<\/code>, and <code>\u06f1\u06f4\u06f0\u06f3<\/code> and <code>1403<\/code>.<\/p>\n\n<p>Add this to your theme's <code>functions.php<\/code> or a small site plugin:<\/p>\n\n<pre><code>add_filter(\n    'relevanssi_remove_punctuation',\n    function ( $string ) {\n        if ( class_exists( 'APSearch_Normalizer' ) ) {\n            $string = APSearch_Normalizer::normalize( $string );\n        }\n        return $string;\n    },\n    20\n);\n<\/code><\/pre>\n\n<p>Relevanssi runs that filter inside its tokenizer, which it uses both when indexing your posts and when parsing what a visitor typed. Normalizing in one place therefore fixes both sides at once. Priority 20 makes it run after Relevanssi's own punctuation handling.<\/p>\n\n<p><strong>Rebuild the Relevanssi index after adding this<\/strong> (Relevanssi's own settings screen), or its stored terms will still be the unnormalized ones.<\/p>\n\n<p>This is a documented starting point, not a supported integration \u2014 the snippet touches Relevanssi's filter, and Relevanssi's own settings still decide what gets indexed.<\/p><\/dd>\n<dt id=\"does%20it%20support%20urdu%2C%20pashto%2C%20kurdish%20or%20hebrew%3F\"><h3>Does it support Urdu, Pashto, Kurdish or Hebrew?<\/h3><\/dt>\n<dd><p>Urdu, Pashto and Dari letter variants are covered. Hebrew needs no normalization of this kind and is unaffected.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Arabic and Persian searches return nothing when the spelling differs by one invisible character. This makes them match.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/352327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=352327"}],"author":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/faizahmaddae"}],"wp:attachment":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=352327"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=352327"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=352327"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=352327"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=352327"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=352327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}