{"id":24434038,"url":"https://github.com/itspriddle/wp-cli-tgmpa-plugin","last_synced_at":"2025-04-23T04:51:27.100Z","repository":{"id":66677158,"uuid":"56360086","full_name":"itspriddle/wp-cli-tgmpa-plugin","owner":"itspriddle","description":"Manage TGMPA plugins with WP-CLI","archived":false,"fork":false,"pushed_at":"2017-11-22T18:03:12.000Z","size":81,"stargazers_count":25,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T22:17:04.508Z","etag":null,"topics":["php","tgmpa","tgmpa-installation","wordpress","wp-cli"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itspriddle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-04-16T01:52:03.000Z","updated_at":"2024-10-03T17:39:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"53e4a155-39bf-4a79-9ccd-b9455c149453","html_url":"https://github.com/itspriddle/wp-cli-tgmpa-plugin","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriddle%2Fwp-cli-tgmpa-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriddle%2Fwp-cli-tgmpa-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriddle%2Fwp-cli-tgmpa-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriddle%2Fwp-cli-tgmpa-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itspriddle","download_url":"https://codeload.github.com/itspriddle/wp-cli-tgmpa-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372947,"owners_count":21419722,"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":["php","tgmpa","tgmpa-installation","wordpress","wp-cli"],"created_at":"2025-01-20T16:53:06.085Z","updated_at":"2025-04-23T04:51:27.079Z","avatar_url":"https://github.com/itspriddle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-cli-tgmpa-plugin\n\nThis WP-CLI package provides the `wp tgmpa-plugin` command for working with\nplugins required using the [TGM Plugin Activation][] library.\n\nQuick links: [Installing](#installing) | [Usage](#usage) | [Troubleshooting](#troubleshooting) | [Contributing](#contributing)\n\n## Installing\n\n### Installation as a WP-CLI package\n\nInstalling this package requires WP-CLI v0.23.0 or greater. Update to the\nlatest stable release with `wp cli update`.\n\nOnce you've done so, you can install this package with `wp package install\nitspriddle/wp-cli-tgmpa-plugin`\n\n### Manual installation\n\nSave [`command.php`][command.php]. For a system-wide installation, add the\nfollowing to `~/.wp-cli/config.yml`; to install just for a single WordPress\nblog add it to `wp-cli.yml` or `wp-cli.local.yml` in the root of your project:\n\n```yaml\nrequire:\n  - /path/to/command.php\n```\n\nNote that you should add to the `require` array if you already have one\npresent, eg:\n\n```yaml\nrequire:\n  - /some/file/i/already/have.php\n  - /path/to/command.php\n```\n\nYou can also pass the `--require` flag when calling `wp tgmpa-plugin`, eg:\n\n```\nwp --require=/path/to/command.php tgmpa-plugin\n```\n\n### Verify installation\n\nIn the root of your blog, run `wp tgmpa-plugin info` to verify that\nthe `TGM_Plugin_Activation` class is loaded. You should see output similar to\nthis:\n\n```\nwp-cli-tgmpa-plugin version:    0.1.0\nTGM_Plugin_Activation version:  2.5.2\nTGM_Plugin_Activation location: /var/www/wordpress/public/wp-content/themes/footheme/includes/plugins/class-tgm-plugin-activation.php\nPlugins registered:             2\n```\n\nSee [Troubleshooting](#troubleshooting) for things to check if you see `Error:\nTGM_Plugin_Activation not loaded!`\n\n## Usage\n\n`wp tgmpa-plugin` provides most of the same commands as `wp plugin`. Most\ncommands are delegated directly to `wp plugin` after validating that any\nspecified plugins are registered with TGMPA.\n\n### wp tgmpa-plugin activate\n\n```\nwp tgmpa-plugin activate [\u003cslug\u003e...] [--all]\n```\n\nActivate TGMPA plugins.\n\n**OPTIONS**\n\n```\n[\u003cslug\u003e...]\nOne or more TGMPA plugins to activate.\n\n[--all]\nIf set, all TGMPA plugins will be activated.\n```\n\n### wp tgmpa-plugin deactivate\n\n```\nwp tgmpa-plugin deactivate [\u003cslug\u003e...] [--all]\n```\n\nDeactivate TGMPA plugins.\n\n**OPTIONS**\n\n```\n[\u003cslug\u003e...]\nOne or more TGMPA plugins to deactivate.\n\n[--all]\nIf set, all TGMPA plugins will be deactivated.\n```\n\n### wp tgmpa-plugin delete\n\n```\nwp tgmpa-plugin delete \u003cslug\u003e...\n```\n\nDelete installed TGMPA plugin files without deactivating or uninstalling.\n\n**OPTIONS**\n\n```\n\u003cslug\u003e...\nOne or more TGMPA plugins to delete.\n```\n\n**EXAMPLES**\n\n```\nwp tgmpa-plugin delete hello\n\n# Delete inactive plugins\nwp tgmpa-plugin delete $(wp tgmpa-plugin list --status=inactive --field=name)\n```\n\n### wp tgmpa-plugin get\n\n```\nwp tgmpa-plugin get \u003cslug\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n```\n\nGet info on an installed TGMPA plugin.\n\n**OPTIONS**\n\n```\n\u003cslug\u003e\nThe TGMPA plugin to get.\n\n[--field=\u003cfield\u003e]\nInstead of returning all info, returns the value of a single field.\n\n[--fields=\u003cfields\u003e]\nLimit the output to specific fields. Defaults to all fields.\n\n[--format=\u003cformat\u003e]\nOutput list as table, json, CSV, yaml. Defaults to table.\n```\n\n**EXAMPLES**\n\n```\nwp tgmpa-plugin get bbpress --format=json\n```\n\n### wp tgmpa-plugin info\n\n```\nwp tgmpa-plugin info [\u003csection\u003e]\n```\n\nShow information about the TGMPA installation.\n\n**OPTIONS**\n\n```\n[\u003csection\u003e]\nAccepted values: version, tgmpa-version, tgmpa-path, plugin-count\n```\n\n**EXAMPLES**\n\n```\nShow all info:\n\nwp tgmpa-plugin info\n\nShow TGMPA version:\n\nwp tgmpa-plugin info tgmpa-version\n\nShow path to TGMPA class:\n\nwp tgmpa-plugin info tgmpa-path\n\nEdit TGMPA class in Vim:\n\nvim $(wp tgmpa-plugin info tgmpa-path)\n\nCheck if TGMPA is installed:\n\nif wp tgmpa-plugin info \u0026\u003e /dev/null; then\n  # Do stuff, maybe `wp tgmpa-plugin install --all`\nfi\n```\n\n### wp tgmpa-plugin install\n\n```\nwp tgmpa-plugin install [\u003cslug\u003e...] [--all] [--all-required] [--all-recommended] [--force] [--activate]\n```\n\nInstall a TGMPA plugin.\n\n**OPTIONS**\n\n```\n[\u003cslug\u003e...]\nOne or more TGMPA plugins to install.\n\n[--all]\nIf set, all TGMPA plugins will be installed.\n\n[--all-required]\nIf set, all required TGMPA plugins will be installed.\n\n[--all-recommended]\nIf set, all recommended (not required) TGMPA plugins will be installed.\n\n[--force]\nIf set, the command will overwrite any installed version of the plugin\nwithout prompting for confirmation.\n\n[--activate]\nIf set, the plugin will be activated immediately after install.\n```\n\n**EXAMPLES**\n\n```\nInstall all TGMPA plugins:\n\nwp tgmpa-plugin install --all\n\nInstall all required TGMPA plugins (excluding recommended plugins):\n\nwp tgmpa-plugin install --all-required\n\nInstall all recommended TGMPA plugins (excluding required plugins):\n\nwp tgmpa-plugin install --all-recommended\n\nInstall specific TGMPA plugins:\n\nwp tgmpa-plugin install some-plugin another-plugin\n\nUpdate external TGMPA plugins:\n\nwp tgmpa-plugin install --force $(wp tgmpa-plugin list --field=name --external)\n```\n\n### wp tgmpa-plugin is-installed\n\n```\nwp tgmpa-plugin is-installed \u003cslug\u003e\n```\n\nCheck if a TGMPA plugin is installed.\n\n**OPTIONS**\n\n```\n\u003cslug\u003e\nThe TGMPA plugin to check.\n```\n\n**EXAMPLES**\n\n```\nwp tgmpa-plugin is-installed hello\necho $? # displays 0 or 1\n```\n\n### wp tgmpa-plugin list\n\n```\nwp tgmpa-plugin list [--\u003cfield\u003e=\u003cvalue\u003e] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n```\n\nGet a list of plugins managed by TGMPA.\n\n**OPTIONS**\n\n```\n[--\u003cfield\u003e=\u003cvalue\u003e]\nFilter results based on the value of a field.\n\n[--field=\u003cfield\u003e]\nPrints the value of a single field for each plugin.\n\n[--fields=\u003cfields\u003e]\nLimit the output to specific object fields.\n\n[--format=\u003cformat\u003e]\nAccepted values: table, csv, json, count, yaml. Default: table\n```\n\n**EXAMPLES**\n\n```\nThis command works like `wp plugin list`, but is limited to TGMPA plugins.\n\nShow default fields for all TGMPA plugins:\n\nwp tgmpa-plugin list\n\nOutput in JSON instead of a table:\n\nwp tgmpa-plugin list --format=json\n\nFilter by installed or uninstalled TGMPA plugins:\n\nwp tgmpa-plugin list --installed\nwp tgmpa-plugin list --no-installed\n\nFilter by required or unrequired TGMPA plugins:\n\nwp tgmpa-plugin list --required\nwp tgmpa-plugin list --no-required\n\nShow only TGMPA plugin slugs:\n\nwp tgmpa-plugin list --field=name\n\nShow non-default fields:\n\nwp tgmpa-plugin list --fields=source,version\n```\n\n### wp tgmpa-plugin path\n\n```\nwp tgmpa-plugin path \u003cslug\u003e [--dir]\n```\n\nGet the path to a TGMPA plugin file or directory.\n\n**OPTIONS**\n\n```\n\u003cslug\u003e\nThe TGMPA plugin to get the path to.\n\n[--dir]\nIf set, get the path to the closest parent directory, instead of the\nplugin file.\n```\n\n**EXAMPLES**\n\n```\ncd $(wp tgmpa-plugin path someplug --dir)\nvim $(wp tgmpa-plugin path someplug)\n```\n\n### wp tgmpa-plugin toggle\n\n```\nwp tgmpa-plugin toggle \u003cslug\u003e...\n```\n\nToggle TGMPA plugins' activation states.\n\n**OPTIONS**\n\n```\n\u003cslug\u003e...\nOne or more TGMPA plugins to toggle.\n```\n\n### wp tgmpa-plugin uninstall\n\n```\nwp tgmpa-plugin uninstall [\u003cslug\u003e...] [--all] [--deactivate] [--skip-delete]\n```\n\nUninstall a TGMPA plugin.\n\n**OPTIONS**\n\n```\n[\u003cslug\u003e...]\nOne or more TGMPA plugins to uninstall.\n\n[--all]\nIf set, all TGMPA plugins will be uninstalled.\n\n[--deactivate]\nDeactivate the TGMPA plugin before uninstalling. Default behavior is to\nwarn and skip if the plugin is active.\n\n[--skip-delete]\nIf set, the TGMPA plugin files will not be deleted. Only the uninstall\nprocedure will be run. Note that deletions affect only the files added to\n`WP_PLUGIN_DIR` and not bundled files used by TGMPA itself.\n```\n\n## Troubleshooting\n\nIf the `TGM_Plugin_Activation` class is not loaded your theme or plugin may be\nusing `is_admin()` to determine whether or not to load the class. To work\naround this, you can set `WP_ADMIN=true` environment variable when running\n`tgmpa-plugin` commands. Try the following to see if the class loads:\n\n```\nWP_ADMIN=true wp tgmpa-plugin info\n```\n\nIf that doesn't work, some themes _also_ check your user account for admin\nprivileges. You can try the above along with using the `--user=` flag with a\nvalid admin user:\n\n```\nWP_ADMIN=true wp tgmpa-plugin info --user=josh\n```\n\nIf all else fails, you can [open an issue][]. Please include a link to the\ntheme or plugin as well as the commands you are trying or any pertinent error\nmessages you see.\n\n## Contributing\n\nCode and ideas are more than welcome.\n\nPlease [open an issue][] with questions, feedback, bug fixes or improvements.\nPull requests should use the same coding style and should include test\ncoverage.\n\n[Open an issue]: https://github.com/itspriddle/wp-cli-tgmpa-plugin/issues\n[TGM Plugin Activation]: http://tgmpluginactivation.com/\n[command.php]: https://github.com/itspriddle/wp-cli-tgmpa-plugin/raw/master/command.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspriddle%2Fwp-cli-tgmpa-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitspriddle%2Fwp-cli-tgmpa-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspriddle%2Fwp-cli-tgmpa-plugin/lists"}