# Images and Css not showing on django production

**URL:** https://forum.djangoproject.com/t/images-and-css-not-showing-on-django-production/34739
**Category:** Deployment
**Created:** [September 12, 2024, 7:07pm UTC](https://forum.djangoproject.com/t/images-and-css-not-showing-on-django-production/34739 "2024-09-12T19:07:30Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)
#### Post date: [September 12, 2024, 8:48pm UTC](https://forum.djangoproject.com/t/images-and-css-not-showing-on-django-production/34739/3 "2024-09-12T20:48:17Z")

</div>

First, managing static files in a production environment is _completely_ different than managing them in development.

You want to _forget_ everything you’ve done in development - it just doesn’t apply, and relying upon that information is not useful. You also don’t want to make references to that information here, it doesn’t help.

Briefly:

- Do not server static files from within your project. Pick an “nginx-friendly” location as the desired target of those files.
- Ensuring permissions are correct is critical.
- Your `STATIC_ROOT` needs to correspond to the path you specify in either your `alias` or `root` directive in nginx.
- Your `STATIC_URL` needs to correspond to the `location` directive.

The docs at [How to deploy static files | Django documentation | Django](https://docs.djangoproject.com/en/5.1/howto/static-files/deployment/) provide a summary. Also, this is a topic that has been talked about a _lot_ here. For some examples, see:

- [Safe Folder Permissions Structure for Django with mod\_wsgi](https://forum.djangoproject.com/t/safe-folder-permissions-structure-for-django-with-mod-wsgi/23420)
- [Minimal docs for how-to deploy django to production.](https://forum.djangoproject.com/t/minimal-docs-for-how-to-deploy-django-to-production/32526)
- [Django and Nginx permission issue on Ubuntu](https://forum.djangoproject.com/t/django-and-nginx-permission-issue-on-ubuntu/26804)
- [CSS files not loading](https://forum.djangoproject.com/t/css-files-not-loading/22053)

Also, if you do a search through the deployment section for nginx, you’ll find a number of other working examples.

---

_[View the full topic](https://forum.djangoproject.com/t/images-and-css-not-showing-on-django-production/34739)._
