WP Manifestindependent plugin directory
manifest / developer / gwdev-management

GW Dev Management

WordPress plugin for hot-fixes and utilities on Gatorworks-hosted websites

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/gatorworks/gwdev-management/archive/refs/heads/main.zip
Updates itself. It ships its own updater, so new versions appear under Dashboard → Updates.

Private plugin for pushing fixes and small bits of logic to every site we host. Every fixes/*.php file is loaded automatically on each request.

Adding a fix

  1. Copy fixes/_template.php to fixes/<slug>.php (no leading underscore).
  2. Fill in the Fix: / Description: header and add your code.
  3. Bump Version in the plugin header and GWDEV_MANAGEMENT_VERSION in gwdev-management.php. The build fails if they don't match.
  4. To build locally: run bin/build.sh. It writes dist/gwdev-management.zip and dist/gwdev-management.json.

Files load in filename order. Files starting with _ are skipped. If a fix throws, including a PHP parse error, it gets logged to the PHP error log and skipped, and the other fixes keep loading.

Releasing

Commit the version bump, then tag it:

git tag v1.1.0 && git push origin v1.1.0

The GitHub Action (.github/workflows/release.yml) builds the plugin. It checks that the tag matches the plugin version, then publishes a GitHub release with the zip and the JSON manifest.

Sites check about every 12 hours and then show the update in wp-admin like any other plugin. To roll it out right away:

wp plugin update gwdev-management

To have sites install new versions on their own:

wp plugin auto-updates enable gwdev-management

First install

wp plugin install https://github.com/Gatorworks/gwdev-management/releases/latest/download/gwdev-management.zip --activate

After that, the plugin updates itself.

Private repo

If the repo is private, put a fine-grained GitHub token in each site's wp-config.php. It needs read-only Contents access to this repo only.

define( 'GWDEV_MANAGEMENT_GITHUB_TOKEN', 'github_pat_...' );

The first install can't use the URL above for a private repo. Download the zip from the release and install it from a local path instead.

Per-site control

wp gwdev-management status                      # version + loaded/disabled/errored counts
wp gwdev-management list                        # every fix and its state on this site
wp gwdev-management disable <slug> [<slug>...]  # turn a fix off here (stored in wp_options)
wp gwdev-management enable  <slug> [<slug>...]

You can also set these in wp-config.php:

define( 'GWDEV_DISABLED_FIXES', array( 'acf-remove-innerblocks-wrapper' ) );
define( 'GWDEV_DISABLE_ALL_FIXES', true ); // kill switch