# WP CLI export to local directory

**URL:** <https://community.localwp.com/t/wp-cli-export-to-local-directory/8655>\
**Category:** Support\
**Created:** [October 4, 2018, 3:29pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655 "2018-10-04T15:29:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clayteller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clayteller/32/14467_2.png) [@clayteller](https://community.localwp.com/u/clayteller)\
**Post date:** [October 4, 2018, 3:29pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/1 "2018-10-04T15:29:11Z")

</div>

Hello, I am SSH’d in to my Local Flywheel WordPress site and using WP CLI, which is great. I would like to “wp export”…does anyone know how I access the xml file that is exported?

Seems like I will either have to A) navigate to the directory in the container in which the xml file was exported and download it to my local directory or B) set a local path in the “wp export” command so the xml file is exported to my local directory. I’m inexperienced with SSH and containers and not sure how to do either really.

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![clayteller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clayteller/32/14467_2.png) [@clayteller](https://community.localwp.com/u/clayteller)\
**Post date:** [October 5, 2018, 2:24pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/2 "2018-10-05T14:24:13Z")

</div>

In the meantime, I figured out a hacky solution where I export the file to the **/app/public** directory and then I can just browse to the file in the root of my site in the browser and save it from there.

If anyone knows a less hacky way of doing this, I would love to learn what it is.

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [October 5, 2018, 4:06pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/3 "2018-10-05T16:06:03Z")

</div>

I think that’s the only way to do it since that’s where the Host’s folder is mounted into the container.

---

<div class="post-metadata">

**Author:** ![clayteller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clayteller/32/14467_2.png) [@clayteller](https://community.localwp.com/u/clayteller)\
**Post date:** [October 5, 2018, 5:01pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/4 "2018-10-05T17:01:55Z")

</div>

Ok thanks @ben.turner.

---

<div class="post-metadata">

**Author:** ![clayteller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clayteller/32/14467_2.png) [@clayteller](https://community.localwp.com/u/clayteller)\
**Post date:** [October 7, 2018, 7:37pm UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/5 "2018-10-07T19:37:03Z")

</div>

Actually, looks like I don’t need to browse to the file in my browser: When the file is exported to the **/app/public** directory in the container it gets synchronized to the **local app/public** directory for the site. So apparently, this results in a local export after all. 👏

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [October 8, 2018, 7:37am UTC](https://community.localwp.com/t/wp-cli-export-to-local-directory/8655/6 "2018-10-08T07:37:05Z")

</div>

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