Skip to content

Fix ghost migrate lowercasing files#1391

Closed
jyergatian wants to merge 3 commits intoTryGhost:mainfrom
jyergatian:fix-ghost-lowercase-files
Closed

Fix ghost migrate lowercasing files#1391
jyergatian wants to merge 3 commits intoTryGhost:mainfrom
jyergatian:fix-ghost-lowercase-files

Conversation

@jyergatian
Copy link
Copy Markdown

I was using migrate ghost... to migrate a ghost instance from one install to another. I found the files downloaded had their filenames all lowercased, but the post and page import expected the original filenames. This resulted in most images, videos, and files embeded within posts and pages broken (missing).

I've made a small adjustment to mg-fs-utils to prevent the lowercasing of filenames, and updated the tests to expect the same filenames which are on the respective servers.

This change ensures file references in posts continue pointing to valid filenames.
Seeing as we no longer convert filenames to lowercase when downloading from the server, our tests should expect the original filenames in their original case.
@PaulAdamDavis PaulAdamDavis added the wontfix This will not be worked on label Feb 25, 2026
@PaulAdamDavis
Copy link
Copy Markdown
Member

Hey @jyergatian, sorry for the extremely late reply to this.

The migrate ghost command should result in a folder of assets and a JSON of content, where paths to those assets are updated, so the tool does function correctly in that regard. You can supply --scrape none if you don't want asset paths changed.

While these tools do have Ghost as a source, their main use-case is to migrate content from other platforms, where consistency in asset paths is not a concern. I think that trying to keep filenames consistent is a losing battle and means we're not able to

In most cases, following this guide is the best way to move content between Ghost sites.
https://docs.ghost.org/migration/ghost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants