Pull from WPEngine via API: How?

Issue Summary

I’ve seen that LocalWP can pull a copy of a site from WPEngine, assumably using an API - possibly the WPEngine API. In the API docs, there doesn’t seem to be a documented method to do this.

How is LocalWP able to do this and is this something which I can do with this API?

Thanks!

Pulling a site from WP Engine is done via Local Connect so there isn’t really an API to do it. On the other hand, it’s basically just connecting over SSH and “doing stuff”, so you could probably create a key for the remote site and script the changing of environments for your needs.

Ah, yes. I found the SSH solution after a bit of digging: for anyone else interested, once you’ve accessed the WPEngine SSH Gateway, you can SSH in and execute:

wp db export -

This will dump out the contents of your database to STDOUT, which can then be captured and processed.

I would like to know how Local Connect does it, though. I suspect there’s an undocumented API call happening somewhere… :slight_smile:

1 Like

That’s the general idea. Local exports the DB to a file and then uses rsync to copy things down – no API required!

:larry:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.