Suddenly can't deploy: Wordpress installation error

Ended my day last night and went to bed. Was deploying fine yesterday.

Today I can’t deploy all of a sudden.

TASK [deploy : WordPress Installed?] ***********************************************************************************************************************************************************************************************************
System info:
  Ansible 2.9.8; Darwin
---------------------------------------------------
non-zero return code
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.

Searching around for answers brings me to topics like this one:

Obviously that’s no longer relevant as Roots uses its own Wordpress composer package now.

This is project specific as I can deploy other projects.

I’ve logged into the server and verified that my /current/web/wp folder exists and that the files exist inside. I’ve also renamed the folder to wp-old and ran composer install from the server and it re-creates the wp folder.

I’m losing it and running out of search results.

From Troubleshooting | Trellis Docs | Roots

SSH into your server and manually run the command where Ansible failed.

Your output tells you which command is failing: “WordPress Installed?”. If you search within Trellis, you get to this task: https://github.com/roots/trellis/blob/17430191bb7211545eb63ba3ba989ee95c262c5f/roles/deploy/hooks/finalize-before.yml#L7-L13

So I suggest running that command under the web user from within the deploy/release directory:

wp core is-installed --skip-plugins --skip-themes --require=/srv/www/<SITE NAME>/shared/tmp_multisite_constants.php

Should be something like that ^

From there hopefully you can figure out why the WP-CLI command is failing.

Thanks @swalkinshaw

I have no idea how this happened but my allow plugins somehow got set to false. I did not change that manually. So weird.

  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "allow-plugins": {
      "composer/installers": true,
      "roots/wordpress-core-installer": true,
      "pivvenit/acf-pro-installer": true
    }
  },

It wasn’t plainly obvious on deploys. This morning I ran composer update locally and was prompted to trust them:

Do you trust "composer/installers" to execute code and wish to enable it now?
(writes "allow-plugins" to composer.json) [y,n,d,?]

I would have zero reason to modify those lines, so not sure what caused that but now it’s all good.

2 Likes