{"id":18812227,"url":"https://github.com/blobfolio/musty","last_synced_at":"2025-09-02T16:31:53.103Z","repository":{"id":137534435,"uuid":"98783826","full_name":"Blobfolio/musty","owner":"Blobfolio","description":"Musty is a WP-CLI plugin that allows must-use WordPress plugins to be managed more or less like regular plugins.","archived":false,"fork":false,"pushed_at":"2019-03-26T02:51:18.000Z","size":898,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-25T20:05:52.774Z","etag":null,"topics":["must-use","wordpress-plugins","wp-cli-package"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blobfolio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2017-07-30T08:05:19.000Z","updated_at":"2019-03-26T02:51:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bb3e8f3-225d-4735-a284-e59f906aa727","html_url":"https://github.com/Blobfolio/musty","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fmusty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fmusty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fmusty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fmusty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blobfolio","download_url":"https://codeload.github.com/Blobfolio/musty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231797738,"owners_count":18428065,"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","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":["must-use","wordpress-plugins","wp-cli-package"],"created_at":"2024-11-07T23:30:59.198Z","updated_at":"2024-12-30T00:14:41.201Z","avatar_url":"https://github.com/Blobfolio.png","language":"PHP","readme":"# Musty\n\nMusty is a [WP-CLI](https://wp-cli.org/) plugin that allows [must-use](https://codex.wordpress.org/Must_Use_Plugins) WordPress plugins to be managed more or less like regular plugins.\n\n * Install must-use plugins from slug or URI.\n * Detect and apply must-use plugin updates.\n * Uninstall must-use plugins.\n * List must-use plugins.\n * Symlink workaround for plugins that come in a directory.\n * Support for third-party-hosted content via filters.\n\n\n\n##### Table of Contents\n\n1. [How it Works](#how-it-works)\n2. [Requirements](#requirements)\n3. [Installation](#installation)\n4. [Use](#use)\n5. [Developer Reference](#developer-reference)\n6. [License](#license)\n\n\n\u0026nbsp;\n\n## How it Works\n\nMust-use plugins are like normal plugins, except they're stored in `wp-content/mu-plugins/`, and management happens entirely through the file system. Because they exist, WordPress loads them at boot. That's the \"must\" in \"must-use\".\n\nThe inability for such plugins to be managed through `wp-admin` is a primary selling point for system administrators.\n\n### Activation\n\nMany normal plugins can be installed in must-use mode, except for the fact that they're contained in a subdirectory. Because the MU process is entirely file-based, WordPress limits its scan to the top level of the `mu-plugins/` directory.\n\nTo work around this, Musty generates a top-level [symlink](https://en.wikipedia.org/wiki/Symbolic_link) for each plugin it finds living in a subdirectory, using the slugs as a naming scheme. For example:\n\n```\nwp-content/mu-plugins/my-plugin.php -\u003e wp-content/mu-plugins/my-plugin/index.php\n```\n\nWordPress loads the links, which resolve to the real plugins. Problem solved.\n\nNote: Musty should not be combined with alternative bootstrapping methods, such as an autoloader file containing manual `require()` references.\n\n### Installation\n\nMusty will install plugins in must-use mode given a slug or Zip file (local or remote). If the plugin is already installed as a regular plugin, it will be deleted to prevent collisions. This deletion bypasses the uninstall process, so data and settings should be retained.\n\nNot all plugins will work correctly in must-use mode. They must be able to correctly determine their path (`mu-plugins/` is not `plugins/`), and some functionality, like localization, requires the use of different functions to correctly trigger.\n\n### Updates\n\nOne unfortunate consequence of `wp-admin` ignoring MU plugins is that they don't get to take part in the usual update triggers. Musty, at least, will parse each must-use plugin fully to find its remote version and download information, so system administrators can run updates via WP-CLI.\n\nThird-party-hosted plugins can also be updated in this way, provided they expose the necessary information. See [Developer Reference](#developer-reference) for a list of methods and examples.\n\n### Removal\n\nMust-use plugins can also be removed via Musty. This process will also clean up any broken symlinks, etc.\n\n\n\u0026nbsp;\n\n## Requirements\n\n * PHP 7.0+;\n * A *nix OS;\n * WP-CLI;\n\nMusty is not compatible with WordPress Multi-Site installations.\n\n\n\u0026nbsp;\n\n## Installation\n\nYou can manually download [musty.zip](https://raw.githubusercontent.com/Blobfolio/musty/master/release/musty.zip) and extract it somewhere on your server.\n\nDebian-based servers can also install Musty using Blobfolio's APT repository:\n\n```bash\n# Import the signing key\nwget -qO - https://apt.blobfolio.com/public.gpg.key | apt-key add -\n\n# apt.blobfolio.com requires HTTPS connection support.\n# This may or may not already be configured on your\n# machine. If APT is unable to connect, install:\napt-get install apt-transport-https\n\n# Debian Stretch\necho \"deb [arch=amd64] https://apt.blobfolio.com/debian/ stretch main\" \u003e /etc/apt/sources.list.d/blobfolio.list\n\n# Ubuntu Bionic\necho \"deb [arch=amd64] https://apt.blobfolio.com/debian/ bionic main\" \u003e /etc/apt/sources.list.d/blobfolio.list\n\n# Update APT sources\napt-get update\n\n# Install it! Note: this will also install the \"wp-cli\"\n# package, if not present.\napt-get install wp-cli-musty\n```\n\nOnce you have the files on your server, they will need to be added to the WP-CLI [configuration](https://make.wordpress.org/cli/handbook/config/#config-files).\n\n```\nrequire:\n  - /opt/musty/index.php\n```\n\nWP-CLI automatically recognizes the following generic configuration paths:\n \n * `/site/root/wp-cli.local.yml`\n * `/site/root/wp-cli.yml`\n * `~/.wp-cli/config.yml`\n\nThe `.deb` package comes with an example configuration that can be used if you don't need to specify any other options.\n\n```bash\n# Install as a symlink.\nln -s /usr/share/musty/wp-cli.local.yml /your/preferred/config/path\n\n# Or copy it.\ncp -a /usr/share/musty/wp-cli.local.yml /your/preferred/config/path\n```\n\nTo verify that the plugin is working correctly, `cd` to a site root and type:\n\n```bash\n# This should return information about Musty's subcommands.\nwp musty --help\n```\n\n\n\u0026nbsp;\n\n## Use\n\nMusty includes the following commands for managing must-use plugins:\n\n| Command      | Description                 |\n| ------------ | --------------------------- |\n| dumpautoload | (re)Generate Symlinks       |\n| install      | Install a Must-Use Plugin   |\n| list         | List Must-Use Plugins       |\n| uninstall    | Uninstall a Must-Use Plugin |\n| upgrade      | Upgrade Must-Use Plugin(s)  |\n\nCommand reference is available in the usual fashion:\n\n```bash\n# e.g. type any of the following from a site's root.\nwp musty dumpautoload --help\nwp musty install --help\nwp musty list --help\nwp musty uninstall --help\nwp musty upgrade --help\n```\n\nMusty also includes a little in the way of self-awareness:\n\n| Command     | Description                                    |\n| ----------- | ---------------------------------------------- |\n| self-update | Update the Musty plugin to the latest version. |\n| version     | Show Musty plugin details.                     |\n\n\n\u0026nbsp;\n\n## Developer Reference\n\nMusty can install plugins by slug (if hosted by [WordPress](https://wordpress.org/plugins/)) or from a local or remote Zip file.\n\nUpdate detection for WP-hosted plugins is automatic, but for third-party plugins, Musty needs a little help. Specifically, Musty needs to know the current stable version and where to get it.\n\nThere are several ways to expose this information:\n\n### JSON Feed\n\nIf your plugin has its own JSON feed mirroring the WP.org API format — with the keys `version` and `download_link` — Musty can use that to pull the relevant information.\n\n#### Metadata\n\nTo specify this URL via metadata, add an `Info URI` entry to your main plugin file's headers:\n\n```php\n\u003c?php\n/**\n * My super awesome plugin is the best.\n *\n * @package my-plugin\n * @version 0.2.0-1\n *\n * @wordpress-plugin\n * Plugin Name: My Plugin\n * Version: 0.2.0-1\n * Info URI: https://mydomain.com/plugin-info.json\n * ...\n */\n```\n\n#### Filter\n\nOr to specify this URL via filter, use the following:\n\n```php\nfunction my_uri_function($json_url) {\n    return 'https://mydomain.com/plugin-info.json';\n}\nadd_filter('musty_info_uri_my-plugin/index.php', 'my_uri_function');\n```\n\n### Manual Version via Filter\n\nIf remote updates are handled in some other arbitrary way, you can inform Musty of the latest release version via filter:\n\n```php\nfunction my_version_function($json_url) {\n    return '1.2.3';\n}\nadd_filter('musty_download_version_my-plugin/index.php', 'my_version_function');\n```\n\n### Manual Download Link via Filter\n\nIf remote updates are handled in some other arbitrary way, you can inform Musty of the remote Zip file via filter:\n\n```php\nfunction my_zip_function($json_url) {\n    return 'https://mydomain.com/plugin.zip';\n}\nadd_filter('musty_download_version_my-plugin/index.php', 'my_zip_function');\n```\n\n\n\u0026nbsp;\n\n## License\n\nCopyright © 2018 [Blobfolio, LLC](https://blobfolio.com) \u0026lt;hello@blobfolio.com\u0026gt;\n\nThis work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.\n\n    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n    Version 2, December 2004\n    \n    Copyright (C) 2004 Sam Hocevar \u003csam@hocevar.net\u003e\n    \n    Everyone is permitted to copy and distribute verbatim or modified\n    copies of this license document, and changing it is allowed as long\n    as the name is changed.\n    \n    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n    \n    0. You just DO WHAT THE FUCK YOU WANT TO.\n\n### Donations\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd width=\"200\"\u003e\u003cimg src=\"https://blobfolio.com/wp-content/themes/b3/svg/btc-github.svg\" width=\"200\" height=\"200\" alt=\"Bitcoin QR\" /\u003e\u003c/td\u003e\n      \u003ctd width=\"450\"\u003eIf you have found this work useful and would like to contribute financially, Bitcoin tips are always welcome!\u003cbr /\u003e\u003cbr /\u003e\u003cstrong\u003e1Af56Nxauv8M1ChyQxtBe1yvdp2jtaB1GF\u003c/strong\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Fmusty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblobfolio%2Fmusty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Fmusty/lists"}