# JSON files in theme asset folder give 404 error

**URL:** <https://forum.ghost.org/t/json-files-in-theme-asset-folder-give-404-error/42012>\
**Category:** Themes\
**Created:** [October 18, 2023, 12:54pm UTC](https://forum.ghost.org/t/json-files-in-theme-asset-folder-give-404-error/42012 "2023-10-18T12:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordankittle](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jordankittle/32/24868_2.png) [@jordankittle](https://forum.ghost.org/u/jordankittle)\
**Post date:** [October 18, 2023, 12:54pm UTC](https://forum.ghost.org/t/json-files-in-theme-asset-folder-give-404-error/42012/1 "2023-10-18T12:54:23Z")

</div>

Hello.

I have been accessing a .json file out of my theme asset folder for a long time now. Suddenly after upgrading to latest ghost it doesn’t work, however, it still works online on my production site. It only stopped working locally. When I try to navigate or fetch this .json file I get a 404 from ghost. Changing the file extension to .js makes it work again. It is only .json files that cannot be served from assets folder. I read this was by design, but that it was only supposed to be the root folder that couldn’t serve json. Putting the file in /content/files/ works just fine. I can navigate to /content/files/file.json just fine. What is going on here? Why will ghost suddenly not allow me to use .json files in my theme folder?

Edit: I think the problem started because I updated to the latest Ghost-CLI, and ghost -CLI is what runs the website in development mode, as opposed to nginx/apache in production. Something in this new ghost-CLI is causing a permanent redirect when navigating to .json files from within the theme/assets/ folder

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [October 18, 2023, 4:00pm UTC](https://forum.ghost.org/t/json-files-in-theme-asset-folder-give-404-error/42012/2 "2023-10-18T16:00:39Z")

</div>

> [@jordankittle](#):
>
> ghost -CLI is what runs the website in development mode, as opposed to nginx/apache in production

In development mode Ghost (the app) is solely responsible for serving all requests. In this case, the CLI just allows starting and stopping the instance without using a full-fledged process manager.

---

<div class="post-metadata">

**Author:** ![jordankittle](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jordankittle/32/24868_2.png) [@jordankittle](https://forum.ghost.org/u/jordankittle)\
**Post date:** [October 18, 2023, 9:54pm UTC](https://forum.ghost.org/t/json-files-in-theme-asset-folder-give-404-error/42012/3 "2023-10-18T21:54:29Z")

</div>

Thank you vikas. Do you know how I can get .json files to be served out of my assets folder locally? It only works in production.
