Trellis: WordPress 4.6 issues

Created on 31 Aug 2016  路  4Comments  路  Source: roots/trellis

This is the new main tracking issue for 4.6 issues.

Related issues:

And Discourse threads:

There are 2 distinct issues here:

  • Emails are failing causing WP install to be shown as failed in development. WP actually gets installed and the site does work. The error message looks like this:
TASK [wordpress-install : Install WP] ******************************************
System info:
  Ansible 2.0.2.0; Vagrant 1.8.5; Darwin
  Trellis at "Create WordPress php-fpm conf after web_root exists"
---------------------------------------------------
PHP Fatal error:  Uncaught phpmailerException: Invalid address:
wordpress@${http_host} in /srv/www/example.com/current/web/wp/wp-includes
/class-phpmailer.php:946
Stack trace:
#0 /srv/www/example.com/current/web/wp/wp-includes/pluggable.php(352):
PHPMailer->setFrom('wordpress@${htt...', 'WordPress')
#1 /srv/www/example.com/current/web/wp/wp-admin/includes/upgrade.php(392):
wp_mail('[email protected]...', 'New WordPress S...', 'Your new WordPr...')
#2 /srv/www/example.com/current/web/wp/wp-admin/includes/upgrade.php(95):
wp_new_blog_notification('example.com', 'http://${HTTP_H...', 1, 'The
password yo...')
#3 phar:///usr/bin/wp/php/commands/core.php(763): wp_install('example.com',
'admin', '[email protected]...', true, '', 'admin')
#4 phar:///usr/bin/wp/php/commands/core.php(573):
Core_Command->_install(Array)
#5 [internal function]: Core_Command->install(Array, Array)
#6 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(67):
call_user_func(Array, Array, Array)
#7 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_C in
/srv/www/example.com/current/web/wp/wp-includes/class-phpmailer.php on line
946
failed: [default] (item=example.com) => {"changed": true, "cmd": ["wp", "core", "install", "--allow-root", "--url=http://${HTTP_HOST}", "--title=example.com", "--admin_user=admin", "--admin_password=admin", "[email protected]"], "delta": "0:00:01.239875", "end": "2016-08-31 02:19:27.143563", "failed": true, "item": "example.com", "rc": 255, "start": "2016-08-31 02:19:25.903688", "stderr": "PHP Fatal error:  Uncaught phpmailerException: Invalid address: wordpress@${http_host} in /srv/www/example.com/current/web/wp/wp-includes/class-phpmailer.php:946\nStack trace:\n#0 /srv/www/example.com/current/web/wp/wp-includes/pluggable.php(352): PHPMailer->setFrom('wordpress@${htt...', 'WordPress')\n#1 /srv/www/example.com/current/web/wp/wp-admin/includes/upgrade.php(392): wp_mail('[email protected]...', 'New WordPress S...', 'Your new WordPr...')\n#2 /srv/www/example.com/current/web/wp/wp-admin/includes/upgrade.php(95): wp_new_blog_notification('example.com', 'http://${HTTP_H...', 1, 'The password yo...')\n#3 phar:///usr/bin/wp/php/commands/core.php(763): wp_install('example.com', 'admin', '[email protected]...', true, '', 'admin')\n#4 phar:///usr/bin/wp/php/commands/core.php(573): Core_Command->_install(Array)\n#5 [internal function]: Core_Command->install(Array, Array)\n#6 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(67): call_user_func(Array, Array, Array)\n#7 [internal function]: WP_CLI\\Dispatcher\\CommandFactory::WP_C in /srv/www/example.com/current/web/wp/wp-includes/class-phpmailer.php on line 946", "stdout": "", "stdout_lines": [], "warnings": []}

https://github.com/WordPress/WordPress/commit/905f4ec0f835dc9eb0a34f37c297bd6a02d519ba is the cause of this problem.

  • Deploys were erroring due to a WP-CLI incompatibility with WP 4.6. WP-CLI 0.24.0 fixed this.

All 4 comments

Re: the first issue - I haven't done any testing beyond my system, but this works:

  • update geerlingguy.composer in requirements.yml to 1.4.2
  • in helpers.yml set wp_home to "{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://{{ ansible_fqdn }}"

Running the following:

Ansible 2.0.2.0

OSX 10.11.6

Vagrant 1.8.5

Since deploy.yml also sets wp_home, that probably needs to be changed too, but I haven't provisioned/deployed to a remote server yet.

I was going to amend my comment in #639, but just wanted to add, even if you have updated WP-CLI, the error appears to be intermittent. Rerunning vagrant reload --provision occasionally succeeds. So if you're still seeing this error, try another couple of times and it might come good.

@runofthemill interesting solution. Check out #647 where I did something similar. I hadn't though of using ansible_fqdn.

Closing since both issues have been addressed and fixed.

Was this page helpful?
0 / 5 - 0 ratings