Local theme development

I would like to do some Theme development locally but, for obvious reasons, I want to be able to use my live data.

My thinking is that I can create some SSH tunnels to my production box, and just set the appropriate configuration options to use the ports I assign to the tunnels.

This is where I’m getting stuck - I’m assuming I will need to run a local instance of Ghost CMS, which isn’t an issue, but where can I configure the mysql port so I can use my live data?

Does your data have to be real-time live? If not, you can just export your content from production and import it into local.

You can configure your database config via the cli:

https://docs.ghost.org/api/ghost-cli/config/

It doesn’t have to be real time update no, but I was hoping up to avoid having to do the theme development by running everything and then manually importing the theme every time.

Is there no way to develop the theme in isolation, with data, to avoid uploading it every time to see what impact it has?

I don’t follow what you’re asking :thinking:

Unless I’m missing something critical in my thought process… when I want to make a change to a theme (e.g. casper), i make the change, zip it up and then upload the zipped file through the admin interface and then look at what the impact was live.

What I’m asking is if there is a way or running the theme in development mode or something, so I can see my changes without having to upload the zip file every time.

Does that make sense?

I think it does - have you seen this section of the docs? I think it will give you a decent starter for theme development :slight_smile:

I haven’t, but I’ll take a look thanks :+1:

That looks like what I was after, thanks!

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