I'm getting a fail on install WP task - Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I have a multisite trellis install. During development I was trying some things and destroyed the droplet.

After doing a new vagrant provision, I keep getting the error (Your PHP installation appears to be missing the MySQL extension which is required by WordPress)

What I tried to do, was change the subfolder install to a subdomain and after this wasn’t succesful, I decided to return back to the previous setup. I even tried installing without multisite to no avail. I also tried installing mysql-server as per some recommendations

Debug output basically says:

{
  "ansible_loop_var": "item",
  "changed": true,
  "cmd": [
    "wp",
    "core",
    "multisite-install",
    "--allow-root",
    "--url=http://approvedcycling.test",
    "--base=/",
    "--title=approvedcycling.com",
    "--admin_user=admin",
    "--admin_password=NNqzrP9waL3AvhsbcKhg4Leq3ToSxX72IWXeq4e1DuG5Yn4VQuqVScucWkwKMRNQ",
    "--admin_email=neven.jevtic123@gmail.com"
  ],
  "delta": "0:00:00.190876",
  "end": "2022-01-21 11:42:39.268736",
  "item": {
    "key": "<redacted>",
    "value": {
      "admin_email": "<redacted>",
      "cache": {
        "duration": "30s",
        "enabled": false,
        "skip_cache_cookie": "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_cart_hash|woocommerce_items_in_cart|wp_woocommerce_session_",
        "skip_cache_uri": "/wp-admin/|/wp-json/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml|/store.*|/cart.*|/my-account.*|/checkout.*|/addons.*"
      },
      "env": {
        "path_current_site": "/"
      },
      "local_path": "../site",
      "multisite": {
        "enabled": true,
        "subdomains": false
      },
      "site_hosts": [
        {
          "canonical": "[redacted]"
        }
      ],
      "ssl": {
        "enabled": false,
        "provider": "self-signed"
      }
    }
  },
  "rc": 1,
  "start": "2022-01-21 11:42:39.077860",
  "stderr_lines": [
    "Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress."
  ],
  "stdout": "",
  "stdout_lines": []
}

Does anyone have more input on it? Could it be:

  • that I updated trellis cli to 1.2.2
  • potential conflict, that mysql is started by lampp (doesn’t change a thing if I switch it off)
  • problem in mysql config, since I can’t start it without lampp

Any input to debug this issue is greatly appreciated.

Reported at Bug: Provisioning fails on "Install WP" task · Issue #1354 · roots/trellis · GitHub

Fixed with Disable `install_recommends` for php packages by swalkinshaw · Pull Request #1355 · roots/trellis · GitHub

1 Like