# How to development locally and sync with production?

**URL:** <https://forum.ghost.org/t/how-to-development-locally-and-sync-with-production/28389>\
**Category:** Themes\
**Created:** [February 7, 2022, 6:34pm UTC](https://forum.ghost.org/t/how-to-development-locally-and-sync-with-production/28389 "2022-02-07T18:34:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boredomdenied](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/boredomdenied/32/16079_2.png) [@boredomdenied](https://forum.ghost.org/u/boredomdenied)\
**Post date:** [February 7, 2022, 6:34pm UTC](https://forum.ghost.org/t/how-to-development-locally-and-sync-with-production/28389/1 "2022-02-07T18:34:52Z")

</div>

Okay, I’m new to theme development with ghost and am a little confused. So I have a production install that already has a half dozen posts. I want to pull all the content from production including the theme into my local ghost install. I’m not sure which directories to copy over and which ones to keep, seeing as there should be some files that differ due to it being a local install vs production install. Is that correct?

I know this is over the top, but I’m going to build a pipeline from local development to production using a self-hosted GitLab install. Basically, I’m skilling up over the next couple of months to land a DevOps position, using the blog to track my progress, and my task for the next couple of days is building that pipeline, and I figure modifying the theme a touch is a good first step and I actually do have a need for this to add a LinkedIn social icon and a few other touches.

So which folders do I copy and which do I omit?

---

<div class="post-metadata">

**Author:** ![TheRoyalFig](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/theroyalfig/32/27771_2.png) [@TheRoyalFig](https://forum.ghost.org/u/TheRoyalFig)\
**Post date:** [February 7, 2022, 6:44pm UTC](https://forum.ghost.org/t/how-to-development-locally-and-sync-with-production/28389/2 "2022-02-07T18:44:48Z")

</div>

Your theme and content are separated on Ghost, so you’ll need two separate processes to sync your local and production instances.

For the theme, I’d reach for Ghost’s GutHub integration that syncs commits to your theme to your production site.

> **[Deploy Ghost Theme - GitHub Marketplace](https://github.com/marketplace/actions/deploy-ghost-theme)**
>
> Build & deploy a theme to your Ghost site

If you don’t want to use GitHub, you can reach for the Admin API to build a similar pipeline.

> **[Ghost Admin API Documentation](https://ghost.org/docs/admin-api/)**
>
> Manage content via Ghost's Admin API, with secure role-based authentication. Read more on Ghost Docs 👉

For your content, you can import and export content via the admin or use webhooks and the admin API to automate the process.

---

<div class="post-metadata">

**Author:** ![boredomdenied](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/boredomdenied/32/16079_2.png) [@boredomdenied](https://forum.ghost.org/u/boredomdenied)\
**Post date:** [February 7, 2022, 6:51pm UTC](https://forum.ghost.org/t/how-to-development-locally-and-sync-with-production/28389/3 "2022-02-07T18:51:21Z")

</div>

I’m using GitLab not Github. Not sure why I would need the Admin API. I just need to know which directories and files to copy over. Okay I figured out the theme at least. It looks like the actual content is stored in MySQL database, which makes sense. I’m not sure the local install uses MySQL? Guess I’ll have to sort this out now
