Proper Process To Create a Duplicate Local Site

I have successfully followed the instructions to create a running local copy of my ghost site (production hosted with ghost). I can successfully make changes locally, update production, and even created my own theme version and am using that.

What’s the correct process for creating a duplicate of a local running instance so that I have a true sandbox locally I can play around with and not impact my stage local copy for production?

I tried the following:

  1. copy the entire local folder
  2. edit the json config file for a different port and different file paths to match new folder
  3. in that new folder did a ghost buster, ghost check-update, and ghost update (5.22.4 to 5.22.6 I think)

My thought was I could then do a ghost run in each of the folders and have each running on those separate ports. But something’s amiss. I can get the second site to APPEAR to come up on the second port, but I can’t get in to the admin area. And when I do a ghost list it seems to reference it as the first site.

So obviously there’s a more correct way to replicate a site locally and have each one runnable.

What is that process?

Thanks much.

The way I’d approach this is to install your second Ghost instance:

ghost install local
(The CLI will handle setting up the server on a new port)

From your first site, go to SettingsLabs and export your posts. Then, upload that file to your first site. Finally, I’d copy the images folder from your first site (content/images) to your new site.

For the custom theme, I keep it in a project folder and symlink to the Ghost content/themes folder. You can also copy the theme folder into that directory.

You’ll have two local instances of the same site running simultaneously.