Skip to content

Warning: "https://wordpress.org/cli/" does not contain valid JSON #238

@Mike-Hermans

Description

@Mike-Hermans

Bug Report

Describe the current, buggy behavior

Running the wp package browse or wp package install <package> commands result in an error:

Warning: "https://wordpress.org/cli/" does not contain valid JSON
Parse error on line 1:
<...
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

I was hoping to bypass this by requesting a direct Github repository, but while it seems to find and download the package correctly, it still results in the same error:

Command: wp package install git@github.com:timber/wp-i18n-twig.git --debug

Debug (bootstrap): argv: /usr/local/bin/wp package install git@github.com:timber/wp-i18n-twig.git --debug (0.046s)
Debug (bootstrap): ABSPATH defined: /Users/mike/dev/sites/kps/ (0.046s)
Debug (hooks): Executing hook: before_wp_load (0.046s)
Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.046s)
Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.046s)
Debug (bootstrap): Running command: package install (0.046s)
Debug (packages): Detected package default branch: main (0.101s)
Installing package timber/wp-i18n-twig (dev-main)
Updating /Users/mike/.wp-cli/packages/composer.json to require the package...
Registering git@github.com:timber/wp-i18n-twig.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Warning: "https://wordpress.org/cli/" does not contain valid JSON
Parse error on line 1:
<...
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
---
Debug (packages): composer.json content:
{
    "name": "wp-cli/wp-cli",
    "description": "Installed community packages used by WP-CLI",
    "version": "2.12.0",
    "authors": [
        {
            "name": "WP-CLI",
            "email": "noreply@wpcli.org"
        }
    ],
    "homepage": "https://wp-cli.org/package-index/",
    "require": {
        "timber/wp-i18n-twig": "dev-main"
    },
    "require-dev": {},
    "minimum-stability": "dev",
    "prefer-stable": true,
    "license": "MIT",
    "repositories": {
        "wp-cli": {
            "type": "composer",
            "url": "https://wp-cli.org/package-index/"
        },
        "timber/wp-i18n-twig": {
            "type": "vcs",
            "url": "git@github.com:timber/wp-i18n-twig.git"
        }
    },
    "config": {
        "secure-http": true
    }
}
 (1.008s)
Error: Package installation failed.
Reverted composer.json.
$ wp cli info                                                                                                                                                
OS:	Darwin 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:46 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6000 arm64
Shell:	/bin/zsh
PHP binary:	/opt/homebrew/Cellar/php@8.2/8.2.28_1/bin/php
PHP version:	8.2.28
php.ini used:	/opt/homebrew/etc/php/8.2/php.ini
MySQL binary:	/opt/homebrew/opt/mysql@8.4/bin/mysql
MySQL version:	mysql  Ver 8.4.4 for macos15.2 on arm64 (Homebrew)
SQL modes:	ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	phar:///usr/local/bin/wp
WP-CLI packages dir:	/Users/mike/.wp-cli/packages/
WP-CLI cache dir:	/Users/mike/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	/Users/mike/dev/sites/kps/wp-content/themes/kunststofplatenshop/wp-cli.yml
WP-CLI version:	2.12.0

Provide a possible solution

I assume there's something wrong with the requested endpoint at https://wordpress.org/cli/. I don't know why this endpoint is still required when directly requesting a Github repository, or if there's anyway to still be able to request these repositories while the service is down.

Provide additional context/Screenshots

I noticed this problem at around 8AM CEST, our last deployments yesterday ran around 3/4PM CEST mostly without issues, although I did hear from colleagues that this action sometimes failed in our deploys already

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions