Cannot deploy after patching core

Hi roots community,

I’m having trouble deploying with ansible. When I run the script, this is the error message:

Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
fatal: []: FAILED! => {"changed": false, "cmd": ["wp", "core", "is-installed", "--skip-plugins", "--skip-themes", "--require=/srv/www/"], "delta": "0:00:00.122341", "end": "2018-01-08 19:22:02.371554", "failed": true, "failed_when_result": true, "rc": 1, "start": "2018-01-08 19:22:02.249213", "stderr": "Error: This does not seem to be a WordPress install.\nPass --path=`path/to/wordpress` or run `wp core download`.", "stderr_lines": ["Error: This does not seem to be a WordPress install.", "Pass --path=`path/to/wordpress` or run `wp core download`."], "stdout": "", "stdout_lines": []}

The error started after a applied a patch to a core file (here’s the patch - it allows you to create menu items without a label, which would normally be removed upon saving).

I tried reverting the commit where I applied the patch, and removed the patch file, but still receiving the above error. Would anyone know what to do in this situation?


Were your deploys previously working? What changes did you make — did you commit WordPress core to your git repo?

Yes and yes. You can see the exact changes here I am now tracking those 3 core files with git…

That’s not compatible with deploying with Composer :confused: You’d need to use something like to do that (here’s an example of it being used)

1 Like

Oh I see. Thanks for that. Is there any way to fix this after the fact?

If deploys are still broken once you’ve completely removed the files from git, you might need to go into the server and clear out the releases directory

Hm okay. Will that break anything on the site?

Yes it would break the site entirely :slight_smile:

Downtime should be minimal if you re-deploy the site right after though.

Thanks for all the responses. I was able to start deploying again once I untracked those core files

git rm --cache <file-name>
1 Like