Ghost uses SQLite databases, which stores content in a single file for each content, so it's easy to back-up, move or copy an entire database in one go.
To solve the problem of having posts only in my development database, I simply shut down Ghost, and switched the production and development SQLite database files. The files are stored in the Ghost content/data
sub-folder:
ghost-dev.db
is the development databaseghost.db
is the production database
If you're in the Ghost folder, the following commands will swap the two environment databases:
$ mv content/data/ghost-dev.db content/data/ghost-dev.db-tmp
$ mv content/data/ghost.db content/data/ghost-dev.db
$ mv content/data/ghost-dev.db-tmp content/data/ghost.db
Restart Ghost in either mode to see the changes.
It's even easier to just copy everything from development to production:
$ cp content/data/ghost-dev.db content/data/ghost.db