{"id":31227594,"url":"https://github.com/upstatement/algolia-connector-wp-plugin","last_synced_at":"2025-09-22T04:55:37.805Z","repository":{"id":298551647,"uuid":"248510258","full_name":"Upstatement/algolia-connector-wp-plugin","owner":"Upstatement","description":"A WordPress plugin for Algolia search with multisite support","archived":false,"fork":false,"pushed_at":"2025-06-11T17:06:48.000Z","size":112,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-11T19:04:47.006Z","etag":null,"topics":["algolia","php","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Upstatement.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-19T13:28:18.000Z","updated_at":"2025-06-11T17:06:50.000Z","dependencies_parsed_at":"2025-06-11T19:04:52.166Z","dependency_job_id":"b1d000f0-b69d-4705-8834-efed9e364a7c","html_url":"https://github.com/Upstatement/algolia-connector-wp-plugin","commit_stats":null,"previous_names":["upstatement/algolia-connector-wp-plugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Upstatement/algolia-connector-wp-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Upstatement%2Falgolia-connector-wp-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Upstatement%2Falgolia-connector-wp-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Upstatement%2Falgolia-connector-wp-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Upstatement%2Falgolia-connector-wp-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Upstatement","download_url":"https://codeload.github.com/Upstatement/algolia-connector-wp-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Upstatement%2Falgolia-connector-wp-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276348327,"owners_count":25626605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algolia","php","wordpress","wordpress-plugin"],"created_at":"2025-09-22T04:55:36.179Z","updated_at":"2025-09-22T04:55:37.793Z","avatar_url":"https://github.com/Upstatement.png","language":"PHP","readme":"# Algolia Connector WordPress plugin\n\nHooks up a connection from WordPress to Algolia.\n\n\u003e [!WARNING]\n\u003e Note that this plugin is in active development and may have missing features or bugs. It is intended primarily as a starting point for a WordPress to Algolia integration. Use with caution!\n\n## System Requirements\n\n- PHP 8.2 or newer.\n- WordPress version 6.6 or newer.\n- [Composer](https://getcomposer.org/)\n\n## Installation\n\n1. Download this plugin and add it to the `/wp-content/plugins/` directory of your WordPress environment.\n2. Install PHP dependencies by running `composer install` in the plugin directory.\n\n## Usage\n\nOnce you have set up your Algolia application, retrieve your account credentials in the [API Keys](https://www.algolia.com/account/api-keys/all) section of your Algolia account. This plugin provides a settings page that can be used to store these values, but it is recommended that you use environment variables (you can also save the values as constants). The following\n\n| Value          | Variable name            |\n| -------------- | ------------------------ |\n| Application ID | `ALGOLIA_APPLICATION_ID` |\n| Search API key | `ALGOLIA_SEARCH_API_KEY` |\n| Admin API key  | `ALGOLIA_ADMIN_API_KEY`  |\n| Index name     | `ALGOLIA_INDEX_NAME`     |\n\n## Configuring your theme\n\nThe plugin exposes a few hooks that allow you to customize what and how data gets sent to the Algolia index.\n\n### `do_action( \"algolia_indexable_post_types\", array $post_types )`\n\nBy default, no content types will be indexed. You can add which post types should be indexed by returning them from the `algolia_indexable_post_types` filter:\n\n#### Parameters\n\n- `$post_types` array\n\n  The list of post types that can be indexed.\n\n#### Example\n\n```php\nadd_filter( 'algolia_indexable_post_types', function( $post_types ) {\n\t$indexable_types = array( 'post', 'page', 'some_custom_type' );\n\treturn array_merge( $post_types, $indexable_types );\n} );\n```\n\n### `do_action( \"algolia_{$post-\u003epost_type}_to_record\", array $record )`\n\nYou can customize the Algolia record with the `algolia_{$post-\u003epost_type}_to_record` hook, replacing the dynamic portion with the post type handle.\n\n#### Parameters\n\n- `$record` array\n\n  The record object that will be saved to Algolia. By default, the record is saved with the following values:\n\n  - `distinct_key` A unique identifier for the post object within Algolia.\n  - `post_id` ID of the post.\n  - `title` Title of the post.\n  - `post_type` Type of the post.\n  - `url` A URL for the post, retrieved with `get_permalink()`.\n  - `book` A default boost setting.\n  - `content` Content. This is usually one of the searchable fields.\n\n```php\n// Modify the record for all Page posts.\nadd_filter( 'algolia_page_to_record', function ( $record ) {\n\t// You can access the WP_Post object like this:\n\t$_post = get_post( $record['post_id'] );\n\n\t// Add other Page data, like post metadata, to the record.\n\t$record['date'] = get_post_meta( $record['post_id'], 'some_meta_key', true );\n\n\treturn $record;\n} );\n```\n\n## WP CLI\n\nThis plugin comes with a few WP CLI commands that can be used to manage an index.\n\n```shell\n# Reindex everything.\nwp algolia reindex\n\n# Reindex just posts and pages.\nwp algolia reindex --type=post,page\n\n# Reindex a single post.\nwp algolia reindex_single 123\n\n# Delete all records in an index.\nwp algolia clear\n\n# Test the connection.\nwp algolia test_connection\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupstatement%2Falgolia-connector-wp-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupstatement%2Falgolia-connector-wp-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupstatement%2Falgolia-connector-wp-plugin/lists"}