Skip to content

Conversation

@soderlind
Copy link
Owner

This pull request introduces batched reindexing to WP Loupe, making it safer and more reliable to rebuild large search indexes without running into admin request timeouts. It adds new REST and WP-CLI interfaces for maintenance, updates documentation and tutorials, and improves developer tooling with Pest support.

Major features and improvements:

Batched Reindexing & Maintenance:

  • Added batched reindexing methods to WP_Loupe_Indexer (reindex_batch_init and reindex_batch_step), enabling incremental index rebuilds to avoid timeouts on large sites.
  • Introduced an admin-only REST endpoint (POST /wp-json/wp-loupe/v1/reindex-batch) and a WP-CLI command (wp wp-loupe reindex) for batched reindexing.
  • Updated admin UI workflow: reindexing is now triggered via a dedicated button, not on settings save. [1] [2]

Documentation & Tutorials:

  • Expanded documentation and tutorials to explain batched reindexing usage in the admin UI, REST API, and WP-CLI, including new diagrams and code examples. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated changelog and README to reflect new features and usage instructions. [1] [2]

Developer Tooling:

  • Added Pest as an alternative test runner alongside PHPUnit, updated composer dependencies, and provided new test scripts. [1] [2]

Internal Improvements:

  • Modified the WP_Loupe_Indexer constructor to allow disabling hook registration (for improved testability).
  • Minor code cleanup and improved error handling in batch operations.

Changelog and Versioning:

  • Bumped version to 0.8.0 and documented all new features and changes in CHANGELOG.md. [1] [2]

- Updated package.json to reflect the new version 0.8.0.
- Updated phpunit.xml.dist to use the latest PHPUnit schema (11.5).
- Updated readme.txt:
  - Changed contributor name to "PerS".
  - Updated stable tag to 0.8.0.
  - Enhanced post-installation instructions for reindexing.
  - Added new section for reindexing on large sites with WP-CLI commands.
  - Added changelog for version 0.8.0 detailing new features and changes.
- Updated wp-loupe.php to set the plugin version to 0.8.0 and updated the MCP version constant.
- Added Pest test runner bootstrap file for integration with existing PHPUnit tests.
- Created initial smoke test using Pest to verify the test bootstrap loads correctly.
- Refactored code formatting in `class-wp-loupe-rest.php` to improve readability by aligning variable assignments and ensuring consistent spacing around array keys.
- Updated the `info.json` file to maintain accurate plugin metadata, including:
  - Ensured consistent indentation and formatting for better readability.
  - Confirmed the plugin version is set to "0.8.0" and updated the changelog to reflect recent changes and features.
  - Verified author information and homepage links are correctly formatted.
- Minor adjustments made to `package-lock.json` and `package.json` to ensure proper formatting and maintain consistency across JSON files, including adding missing newlines at the end of files.
@soderlind soderlind merged commit ec9e990 into main Jan 1, 2026
3 checks passed
@soderlind soderlind deleted the indexing/batches branch January 1, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants