Error on wordpress-install : Install WP

Hi,
I had a project on my macbook pro that was working just fine but then I wanted to work on another Mac so I cloned the repo, created the .vault_pass, installed Ansible with brew install ansible and other stuff I needed.
Then I ran $ vagrant up --provisionand local server was working.
But I think I didn’t change anything and now I have an error no matter what I do:
‘$ vagrant destroy’ → ‘$ vagrant up --provision’
I think I found the same problem in the forum with no answer:

My error:

K [wordpress-install : Setup packagist.com authentication] ******************
 [WARNING]: Failure using method (v2_runner_item_on_skipped) in callback plugin
(<ansible.plugins.callback.output.CallbackModule object at 0x1083e4e10>):
'item'


TASK [wordpress-install : Install Dependencies with Composer] ******************
ok: [default] => (item=webi.sh)

TASK [wordpress-install : Install WP] ******************************************
System info:
  Ansible 2.4.2.0; Vagrant 2.0.1; Darwin
  Trellis at "Add MariaDB 10.2 PPA"
---------------------------------------------------
failed: [default] (item=webi) => {"changed": true, "cmd": ["wp", "core", "install", "--allow-root", "--url=http://webi.test", "--title=webi", "--admin_user=admin", "--admin_password=ASDASDASD", "--admin_email=mail@gmail.com"], "delta": "0:00:00.059070", "end": "2018-01-04 13:51:05.014016", "item": "webi", "msg": "non-zero return code", "rc": 255, "start": "2018-01-04 13:51:04.954946", "stderr": "PHP Fatal error:  Uncaught Error: Class 'Dotenv\\Dotenv' not found in /srv/www/webi/current/config/application.php:17\nStack trace:\n#0 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1070) : eval()'d code(10): require_once()\n#1 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1070): eval()\n#2 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1032): WP_CLI\\Runner->load_wordpress()\n#3 phar:///usr/bin/wp/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\\Runner->start()\n#4 phar:///usr/bin/wp/php/bootstrap.php(75): WP_CLI\\Bootstrap\\LaunchRunner->process(Object(WP_CLI\\Bootstrap\\BootstrapState))\n#5 phar:///usr/bin/wp/php/wp-cli.php(23): WP_CLI\\bootstrap()\n#6 phar:///usr/bin/wp/php/boot-phar.php(8): include('phar:///usr/bin...')\n#7 /usr/bin/wp(4): include('phar:///usr/bin...')\n#8 {main}\n  thrown in /srv/www/webi.sh/current/config/application.php on line 17", "stderr_lines": ["PHP Fatal error:  Uncaught Error: Class 'Dotenv\\Dotenv' not found in /srv/www/webi/current/config/application.php:17", "Stack trace:", "#0 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1070) : eval()'d code(10): require_once()", "#1 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1070): eval()", "#2 phar:///usr/bin/wp/php/WP_CLI/Runner.php(1032): WP_CLI\\Runner->load_wordpress()", "#3 phar:///usr/bin/wp/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\\Runner->start()", "#4 phar:///usr/bin/wp/php/bootstrap.php(75): WP_CLI\\Bootstrap\\LaunchRunner->process(Object(WP_CLI\\Bootstrap\\BootstrapState))", "#5 phar:///usr/bin/wp/php/wp-cli.php(23): WP_CLI\\bootstrap()", "#6 phar:///usr/bin/wp/php/boot-phar.php(8): include('phar:///usr/bin...')", "#7 /usr/bin/wp(4): include('phar:///usr/bin...')", "#8 {main}", "  thrown in /srv/www/webi/current/config/application.php on line 17"], "stdout": "", "stdout_lines": []}
	to retry, use: --limit @/Users/username/webdev/webi/trellis/dev.retry

PLAY RECAP *********************************************************************
default                    : ok=95   changed=1    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I can test whatever you want, just need to work :frowning:

Thanks

Looks like this might be the same issue noted in PHP Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found - related to a bug in Composer 1.6.1. Try downgrading as per the solution in post #11 on that thread :slight_smile:

1 Like

Seems to work now!!!
Had to $ vagrant destroy and then provision again but is working now.
I hope its permanent :stuck_out_tongue:
Thanks :smiley:

1 Like