Guides › HTML / PHP sites › Site down or error screens

Django: Static Files Not Loading in Production

Static.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Site down or error page

With DEBUG=False, Django does not serve static files itself. The admin and your CSS look unstyled until you collect them and the web server is told where they live.

1Check settings2Collect the files3Serve them4Or use WhiteNoise5Check the template6Clear caches7Test the addressFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Check settings

Illustration for Step 1: Check settings

Set STATIC_URL = '/static/' and STATIC_ROOT = BASE_DIR / 'staticfiles'.

Step 2: Collect the files

Illustration for Step 2: Collect the files

Run python manage.py collectstatic. It copies all static files into STATIC_ROOT.

Step 3: Serve them

Illustration for Step 3: Serve them

With Nginx or Apache, map /static/ to the STATIC_ROOT folder. Check read permissions.

Step 4: Or use WhiteNoise

Illustration for Step 4: Or use WhiteNoise

Add whitenoise.middleware.WhiteNoiseMiddleware just after the security middleware, and STATICFILES_STORAGE settings if wanted.

Step 5: Check the template

Illustration for Step 5: Check the template

Load {% load static %} and use {% static 'css/style.css' %}.

Step 6: Clear caches

Illustration for Step 6: Clear caches

Hard refresh. Re-run collectstatic after changes.

Step 7: Test the address

Illustration for Step 7: Test the address

Open /static/admin/css/base.css in the browser. If it loads, static serving works.

Still stuck?

If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-22.