Hi,
I think I’ve figured out how to run wp cli commands from a custom Add on:
import { getServiceContainer } from '@getflywheel/local/main';
getServiceContainer().cradle.wpCli.run( ...
Doing things like:
SiteData.getSite(siteId), ['plugin', 'install', 'woocommerce']
Works.
But if i try running doing something like:
SiteData.getSite(siteId), ['db', 'import', 'path/to/file/filename.sql']
The response is an error and db is not imported.
Tried simpler command like db clean --yes it also fails.
Tried running the cmd that this thing runs, gives me an error:
Access denied for user 'root'@'localhost' (using password: YES)
Is it not possible to run wp db commands trough this? Any other way of doing a db import?