Deploy for update with composer and get: This does not seem to be a WordPress install + PHP Fatal error in log

Hi,
After developing locally and deploy, I got the fresh Wordpress install (the first time you deploy staging env., when you see wordpress first config window in browser). I was happy.

Then I realize I really needed to use Composer but not sure that will broke something so I tried to copy my local project to make a test.

Yes I know, it’s a mistake if you didn’t start with a fresh Trellis because vagrant run the same project but changed the path in /etc/exports as I discover :scream:.

After I fixed the path of /etc/exports and get help here with Composer, all works well again in my local machine.

I commit the changes and then I try to deploy to update Composer and install the plugins in staging env.

I get the error:

TASK: [deploy | WordPress Installed?] ***************************************** 
failed: [XXX.XXX.XX.XXX] => {"changed": false, "cmd": ["wp", "core", "is-installed"], "delta": "0:00:00.043192", "end": "2016-04-07 14:14:38.329698", "failed": true, "failed_when_result": true, "rc": 1, "start": "2016-04-07 14:14:38.286506", "stdout_lines": [], "warnings": []}
stderr: Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.

So I think I can repair with the provision command ansible-playbook server.yml -e env= but I get the same error when I retry deploy.

When I ssh into my staging machine, I saw all the files as before, but I don’t find how to fix this.

See a lot of old thread with this kind of error but nothing seems related to my problem. I checked log and see this:

2016/04/07 14:21:51 [error] 25921#25921: *752 FastCGI sent in stderr: "PHP message: PHP Warning:  require(/srv/www/mysite.com/releases/20160407141421/web/wp/wp-blog-header.php): failed to open stream: No such file or directory in /srv/www/mysite.com/releases/20160407141421/web/index.php on line 5
PHP message: PHP Fatal error:  require(): Failed opening required '/srv/www/mysite.com/releases/20160407141421/web/wp/wp-blog-header.php' (include_path='.:/usr/share/php') in /srv/www/mysite.com/releases/20160407141421/web/index.php on line 5" while reading response header from upstream, client:  XX.XX.XXX.XXX, server: dev.mysite.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "dev.mysite.com"

Anyone have an idea of where to begin? It is FastCGI caching, user share php or ???

Thank you

Ok I see there is nothing in wp/ folder, maybe I’m better to do a fresh install of Ubuntu and redo deploy for staging.

Is there something I need to care before to do it?

Or is there an easy way to run provision or deploy as it was the first time and in that way it will install Wordpress?

Thank you

It’s hard to tell from your original post what you actually did to your local or remote server. I’d suggest just starting it fresh again if you’re able to. It’s the best way to ensure you’re back to the original state of things.

1 Like

Yes I can, but that sucks. At least my search for the problem made me learn better about how Nginx, FastCGI and Ansible works.

Thank you anyway.