Skip to content

2.1.0: WP-CLI commands

Latest

Choose a tag to compare

@pfcode pfcode released this 18 Oct 12:35
2.1.0
4d48b87

WP-CLI commands to set up and run the plugin without wp-admin (wp help mpcl).
No command prints the API token or key material.

  • wp mpcl connect --key=<key> [--sync] saves the API credentials; the token is
    read from STDIN and checked before saving. wp mpcl disconnect [--purge]
    removes them, and with --purge the synchronised machines.
  • wp mpcl test-connection checks the saved credentials and exits non-zero on
    failure, for use in monitoring.
  • wp mpcl sync [--reset] synchronises right away and reports the number of
    machines or the reason of a failure.
  • wp mpcl schedule enable [--interval=1h]|disable|status controls the
    automatic synchronisation.
  • wp mpcl status shows the connection, synchronisation and catalogue state
    without calling the API.
  • wp mpcl config list|get|set reads and changes the settings with the same
    validation as the settings page.
  • wp mpcl catalog create-page|set-page creates or chooses the catalogue page.
  • wp mpcl machines list|get shows the synchronised machines.
  • wp mpcl secrets status|generate-key [--write]|rekey manage the encryption
    key: add or remove MPCL_ENCRYPTION_KEY without re-entering the API token,
    and recover the token after the salts were shuffled (old salt read from STDIN).
  • Declares compliance with the WP Consent API, so Site Health no longer lists
    the plugin as not compliant. The plugin sets no cookies.
  • The plugin's author is now Reprostar, and its address points to the
    lowercase GitHub organisation (github.com/reprostar/mpcl-wordpress).
  • A token encrypted with the salt still reads after MPCL_ENCRYPTION_KEY is
    added. Saving the settings no longer re-encrypts an unchanged token, and keeps
    a token that cannot be decrypted so that it can still be recovered.

Requires WordPress 6.9+ and PHP 7.4+. Updating from 2.0.x needs no extra steps.