Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#64218 closed defect (bug) (fixed)

Running `env:cli db` commands fails due to failed certificate validation

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

#63876 solved an issue where the installation script for the local development environment was failing due to upstream changes to the base container for the PHP Docker images. That was ultimately solved by passing --defaults to the db WP-CLI commands in installs.js.

@westonruter discovered another scenario where this issue surfaces: any WP-CLI db commands called through npm run env:cli.

Change History (10)

This ticket was mentioned in PR #10490 on WordPress/wordpress-develop by @desrosj.


7 months ago
#1

In r60735, a change was made to the installation-related code in the local development environment that invokes any wp db commands to circumvent a failure caused by the presence of a self-signed certificate within the certificate chain.

However, that did not fix any wp db commands called through the env:cli npm script. This aims to do that by adding --defaults anytime env:cli is run with a command nested under db.

Trac ticket: Core-64218.

#2 @desrosj
7 months ago

Noting that this should likely be backported to all versions with support for PHP 8.1 or higher, as those are the images that are or will be affected.

This ticket was mentioned in Slack in #core by desrosj. View the logs.


7 months ago

@mukesh27 commented on PR #10490:


7 months ago
#4

For me current in trunk export working fine.

$ npm run env:cli db export

> WordPress@6.9.0 env:cli
> node ./tools/local-env/scripts/docker.js exec --user wp_php cli wp db export

Success: Exported to 'wordpress_develop-2025-11-08-f56a684.sql'.

This ticket was mentioned in Slack in #core by welcher. View the logs.


7 months ago

#6 @desrosj
7 months ago

  • Owner set to desrosj
  • Status changed from new to assigned

@desrosj commented on PR #10490:


7 months ago
#7

For me current in trunk export working fine.

@mukeshpanchal27 to confirm, you meant that it was working fine without this PR? If so, which PHP version were you using? This issue currently only affects the PHP >= 8.3 wordpressdevelop Docker images.

I'm going to commit this ahead of RC1, but it's a build tool-related change so it can be reverted or adjusted at any point of the release cycle.

#8 @desrosj
7 months ago

  • Keywords commit added

#9 @desrosj
7 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [61196].

@desrosj commented on PR #10490:


7 months ago
#10

Merged in r61196.

Note: See TracTickets for help on using tickets.