Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add multisite support from cli #9

Merged
merged 13 commits into from
Aug 1, 2023

Conversation

dsawardekar
Copy link
Collaborator

Description of the Change

This PR adds support for Multisite WordPress installations via the WP CLI commands.

  • The find command now supports a --network option
  • The index command also supports a --network option
  • The delete-index command also supports a --network option

The --network option will iterate over all the sites on a Multisite install. It also accepts a comma delimited list of site_ids to limit the operation to subset of sites, eg:- --network=1,2.

image

You can also combine the --network option with the --count option to get a summary of a block's usage across the network.

image

How to test the Change

  • Pull this branch locally
  • Network activate the block-catalog plugin on a Multisite install
  • Run the index with wp block-catalog index --network
  • Search for blocks across the network

Changelog Entry

Added - Multisite Support via WP CLI with the --network option

Credits

Props @dsawardekar

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dsawardekar dsawardekar requested a review from jeffpaul July 27, 2023 06:39
@jeffpaul jeffpaul added this to the 1.5.0 milestone Jul 31, 2023
@jeffpaul jeffpaul requested review from a team and Sidsector9 and removed request for jeffpaul and a team July 31, 2023 13:12
Copy link
Member

@Sidsector9 Sidsector9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well on both single and multisite installs 👍

@dsawardekar dsawardekar merged commit d779804 into develop Aug 1, 2023
@dsawardekar dsawardekar deleted the feature/add-multisite-support-from-cli branch August 1, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants