Custom permalinks in Ghost

Aug 27, 2015
[Ghost](http://ghost.org) by default only lets you have dated permalink `:year/:month/:day/:slug` or title `:title` based with is set by default.

You can change this by editing the Sqlite Database and updating the the permalink column, this will let you have custom url for your posts, this will only affect urls of your posts and not pages.

Backup the Database before making any changes to it.

You need stop Ghost, than access the Database using Sqlite CLI.

“` sqlite3 content/data/ghost.db “`
In development mode the Database will be ``ghost-dev.db`.`
``` sqlite3 content/data/ghost-dev.db ```
Use the query below.
``` UPDATE settings SET value = ‘/journal/:slug/` WHERE key = 'permalinks' ```
Now your permalink will be ``http://example.com/journal/welcome-to-ghost/`, you can set journal to anything you like.`

After this step you can start Ghost.

If you visit the settings panel in your Ghost admin, you will see. that the dated permalink has been tick(turned on), this is because Ghost believes that you are using dated permalinks.

If you want to revert back, you can tick the dated permalink under settings panel in Ghost admin, this will set the url back to the default <code class="highlighter-rouge">:slug, you can re tick the dated permalink and enable the actual dated permalink.

Happy Blogging.

Have a question? leave a comment below.


If you like this content, please consider buying me a coffee.

Buy me a coffeeBuy me a coffee

You will get access to contributer exclusive resources and content.

Thank you!



Darryl Dias

I am a student, artist, and author currently living in Florida. My interests range from technology to arts. I am also interested in programming, writing

Analytics by GoSquared