# The johnpbloch/wordpress:4.7 upgrade issue

**URL:** https://discourse.roots.io/t/the-johnpbloch-wordpress-4-7-upgrade-issue/11215
**Category:** trellis
**Created:** 2017-12-31T18:16:04Z
**Posts:** 5

## Post 1 by @mZoo — 2017-12-31T18:16:05Z

I spent a bit of time on this and since original post is closed wanted to expand a tiny bit on my experiences with the [solution](https://discourse.roots.io/t/johnpbloch-wordpress-moved-to-a-new-configuration-and-wp-goes-missing/9124/45?u=mzoo) by @fullyint :

## Local dev

```
# run commands in local machine Bedrock `site` dir

composer remove johnpbloch/wordpress

composer clear-cache

composer require johnpbloch/wordpress:4.7.3

# NOTE I used: composer require johnpbloch/wordpress
# to get the latest version
```

git add…, git commit…, git push…

## Remote server

```
# run commands in local machine `trellis` dir
# edit `production` to be your <environment>
# edit `example.com` to be your site name

ansible "web:&production" -m command -a "composer clear-cache" -u web

ansible-playbook deploy.yml -e env=production -e site=example.com -e 'project_copy_folders=[]'
```

If you have customized `project_copy_folders`, just temporarily remove vendor from your `project_copy_folders` and run `deploy.yml` (instead of using `-e 'project_copy_folders=[]'` in second command above).

## My Notes

I had previously upgraded to `johnpbloch/wordpress:4.9` to I did not include the version number in `composer require johnpbloch/wordpress`.

This, today, adds `johnpbloch/wordpress: '^4.9'` to the `composer.json` file.

I was still getting an error on `deploy : WordPress Installed?`:

```
PHP Fatal error: Uncaught Error: Call to undefined function apply_filters()
```

[Solution](https://discourse.roots.io/t/php-error-when-deploy-after-update-to-wp-4-6/7458/5?u=mzoo) was to ssh into the server and run `sudo wp cli update --allow-root`.

Thanks as always. Happy New Year Roots Community.

---

## Post 2 by @ben — 2017-12-31T18:25:56Z

> [@mZoo](#):
>
> Solution was to ssh into the server and run sudo wp cli update --allow-root.

This is not the appropriate solution. Also, I feel like this thread is unrelated to the thread that you originally linked :confused:

---

## Post 3 by @ben — 2017-12-31T18:26:01Z



---

## Post 4 by @mZoo — 2017-12-31T22:12:03Z

I agree that it’s unrelated, Ben–and thank you–but it was another issue that was preventing the `deploy : WordPress Installed?` from completing so became a red herring for me. In other words I was thinking that the first solution wasn’t working.

I’d love to know your suggestion on what the appropriate solution would be to `PHP Fatal error: Uncaught Error: Call to undefined function apply_filters()` if you have the bandwidth to point me in a better direction.

---

## Post 5 by @ben — 2018-01-01T00:03:17Z

Update the WP-CLI version in `trellis/roles/wp-cli/defaults/main.yml` then re-provision :slight_smile:
