# Kinsta Sync Script fails

**URL:** https://discourse.roots.io/t/kinsta-sync-script-fails/17549
**Category:** bedrock
**Tags:** deploys, kinsta, trellis
**Created:** 2020-01-31T15:48:57Z
**Posts:** 6

## Post 1 by @code23_isaac — 2020-01-31T15:48:57Z

Hi,

Massive thanks to everyone involved with Roots, loving it so far!

I’ve got a trellis/bedrock/sage setup, deployed to kinsta fine but struggling to get the kinsta sync script to work to push the database up.

It fails at `wp "@$FROM" db export - | wp "@$TO" db import - &&`

I get the following error:

```
bash: line 0: cd: /srv/www/sitename.co.uk/current: No such file or directory
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.
Success: Imported from 'STDIN'.
Error: The site you have requested is not installed.
Run `wp core install` to create database tables.
```

Any help much appreciated!

---

## Post 2 by @alwaysblank — 2020-01-31T16:29:29Z

> [@code23_isaac](#):
>
> `bash: line 0: cd: /srv/www/sitename.co.uk/current: No such file or directory`

IIRC the directory that your current site is in on Kinsta is actually `public/current` not `current`. I’m not sure where you’re specifying the URL, but maybe you can change it?

Kinsta also has some issues w/ running WP-CLI commands from not-directly-in-the-WP-folder locations, because the version of WP-CLI that Kinsta has configured assumes that WP is in a location that it isn’t in w/ Bedrock. Fortunately IME you can fix this pretty easily by creating `~/wp-cli.yml` and adding the following line:

```
path: public/current/web/wp
```

---

## Post 3 by @code23_isaac — 2020-01-31T16:48:42Z

The script connects okay to the kinsta database as it’s able to export it and reset it, it’s at the point where it tries to upload the local db that it fails, so i assumed it would be a problem with the local path.

For instance I can run `wp @production plugin list` successfully, so safe to assume that WP CLI is running okay?

My `@development` alias is as the given example:

```
@development:
  ssh: vagrant@sitename.test:/srv/www/sitename.co.uk/current
```

---

## Post 4 by @code23_isaac — 2020-01-31T17:28:10Z

Okay seems my development db credentials are not working as `wp db export` gives `Access denied.`

Will try and solve this

---

## Post 5 by @jamiegrand — 2022-06-15T10:32:06Z

I have run into the same issue, did you manage to resolve this?

---

## Post 6 by @jamiegrand — 2022-06-16T10:48:30Z

school boy error… had not set up the development wordpress\_site.yml correctly…
