# Multisite remote provision/deploy doesn't create any database tables

**URL:** https://discourse.roots.io/t/multisite-remote-provision-deploy-doesnt-create-any-database-tables/9097
**Category:** trellis
**Created:** 2017-03-16T04:14:42Z
**Posts:** 5

## Post 1 by @samburgers — 2017-03-16T04:14:42Z

Hi,

Setting up multisite install as per docs provisions locally fine, but when I provision and deploy to remote server it creates a database, but there are no database tables, and cannot install wordpress. Ansible runs all tasks without error.

from

`trellis/group_vars/staging/wordpress_sites.yml`

```
multisite:
      enabled: true
      subdomains: false
```

`site/config/application.php`

```
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', env('MULTISITE') ?? true);
define('SUBDOMAIN_INSTALL', env('SUBDOMAIN_INSTALL') ?? false); // Set to false if using subdirectories

define('DOMAIN_CURRENT_SITE', env('DOMAIN_CURRENT_SITE'));
define('PATH_CURRENT_SITE', env('PATH_CURRENT_SITE') ?: '/');
define('SITE_ID_CURRENT_SITE', env('SITE_ID_CURRENT_SITE') ?: 1);
define('BLOG_ID_CURRENT_SITE', env('BLOG_ID_CURRENT_SITE') ?: 1);
```

Manually importing the local wordpress tables into the remote db fixes things however.

---

## Post 2 by @fullyint — 2017-03-16T04:26:11Z

Given Trellis creates DB tables in development, it can be surprising that …

> **Trellis does not automatically install WordPress on remote servers.** It’s normal and expected to see the WordPress install screen the first time you deploy. It’s up to you to either import an existing database or install a fresh site. _[– deploy docs](https://roots.io/trellis/docs/deploys/#deploying)_

Deploying is a process you will repeat many times as your site evolves and updates over time, whereas importing or creating DB tables will typically only happen once, after your initial deploy. So, the deploy doesn’t automatically create/import tables.

If you notice a great place to make another mention of this in the [docs](https://github.com/roots/docs), feel free to submit a PR.

---

## Post 3 by @samburgers — 2017-03-16T04:41:51Z

Thats right, and after provisioning/first-deploying a non-multisite Roots install, hitting any page will direct you to the “Install wordpress” screen. With multisite, as it is, it just shows a database connection error, and no option to install/setup WordPress.

Here is a screenshot of the page that appears instead.

[![](https://i.imgur.com/D3l8JM0.png) ](https://i.imgur.com/D3l8JM0.png)

Cheers

---

## Post 4 by @apmarshall — 2017-04-12T15:51:18Z

Running into this same issue on first deploy.

Only way I’m seeing to solve this is to ssh in and run `wp core multisite-install`, manually typing in the variables from my `.env`, then after the install deleting the new lines from `wp-config` since they are redundant to what will be in `application.php`.

Is that the recommended workflow or is there a better way to get the site installed on first deploy?

---

## Post 5 by @chrillep — 2018-05-15T09:20:23Z

getting same error…  
Usually you have to install wordpress without multisite and then convert it?
