# Shouldn't this run by default?

**URL:** https://discourse.roots.io/t/shouldnt-this-run-by-default/11939
**Category:** trellis
**Created:** 2018-03-17T01:15:57Z
**Posts:** 6
**Showing post:** 6 of 6

## Post 6 by @strarsis — 2018-03-17T16:07:29Z

Maybe this is helpful for someone, this I am using now in `*-finalize-after` deploy hook for preparing WordPress in order to install other languages on a yet non-prepared site:

```
- name: Install WP (required for installing languages on empty site)
  command: wp core {{ project.multisite.enabled | default(false) | ternary('multisite-install', 'install') }}
           --allow-root
           --url="{{ site_env.wp_home }}"
           {% if project.multisite.enabled | default(false) %}
           --base="{{ project.multisite.base_path | default('/') }}"
           --subdomains="{{ project.multisite.subdomains | default('false') }}"
           {% endif %}
           --title="{{ project.site_title | default(site) }}"
           --admin_user="{{ project.admin_user | default('admin') }}"
           --admin_password="{{ vault_wordpress_sites[site].admin_password }}"
           --admin_email="{{ project.admin_email }}"
  args:
    chdir: "{{ deploy_helper.current_path }}"
  register: wp_install
  changed_when: "'WordPress is already installed.' not in wp_install.stdout and 'The network already exists.' not in wp_install.stdout"
```

---

_[View the full topic](https://discourse.roots.io/t/shouldnt-this-run-by-default/11939)._
