Skip to content
By stack4 min read

Django hosting for web projects

Short answer

In production Django needs a compatible Python version, a WSGI server instead of runserver, a database such as MySQL, collected static files and safe settings like DEBUG=False. On ArabyHost, Django runs on AI/Developer plans through Setup Python App and Phusion Passenger, with SSH for migrate and collectstatic.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What Django needs in production
  2. Which plan fits Django?
  3. How deployment works on ArabyHost
  4. Limits to know up front
  5. On ArabyHost

Django ships with most of what a serious site needs: an admin, user accounts, an ORM and CSRF protection. Going from runserver on your laptop to a real site still takes an application server, a production database, collected static files and different security settings. This page covers what the project needs, how it runs on ArabyHost and where the limits are.

What Django needs in production

Requirement Details On ArabyHost
Python version Django 5.2 LTS supports Python 3.10 to 3.13; Django 6.0 requires 3.12 or newer Python 3.9 to 3.12; pick 3.12 for new projects
WSGI server Uses the wsgi.py Django generates Phusion Passenger via passenger_wsgi.py
Database MySQL, MariaDB or PostgreSQL; SQLite for experiments MySQL/MariaDB from the control panel
Static files collectstatic into STATIC_ROOT A public folder of the domain, or WhiteNoise
Management commands migrate, createsuperuser SSH jailed in CageFS
Secrets SECRET_KEY and database credentials Environment variables on the app’s page
HTTPS Needed for secure cookies Free SSL issued automatically
Background work Celery or scheduled jobs Workers kept alive by cron

Core production settings

Read sensitive values from environment variables, and use utf8mb4 so Arabic text and emoji are stored correctly:

import os

DEBUG = False
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
ALLOWED_HOSTS = ["example.com", "www.example.com"]
CSRF_TRUSTED_ORIGINS = ["https://example.com"]
STATIC_ROOT = os.path.expanduser("~/public_html/static")

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.mysql",
        "NAME": os.environ["DB_NAME"],
        "USER": os.environ["DB_USER"],
        "PASSWORD": os.environ["DB_PASSWORD"],
        "HOST": "localhost",
        "OPTIONS": {"charset": "utf8mb4"},
    }
}

Which plan fits Django?

Django runs on AI/Developer plans only, since they’re the ones with Python apps and SSH; shared, WordPress and WooCommerce plans run PHP only. AI plans also give you Git for deploying from GitHub, and Node.js 20 and 24 if your front end is built with JavaScript tooling.

Size the plan to the project: a blog or company site with an admin needs little, while a marketplace or platform with uploads and many concurrent users needs more memory and processes. Compare them on the AI/Developer plans page.

How deployment works on ArabyHost

  1. Create a database and user under MySQL Databases in cPanel, as in the MySQL database guide.
  2. In Setup Python App, create an app with Python 3.12 and set the project folder and URL.
  3. Deploy the code from GitHub with Git Version Control, upload a ZIP, or push from Claude or Cursor through Araby MCP.
  4. Point passenger_wsgi.py at your settings module:
import os, sys
sys.path.insert(0, os.path.dirname(__file__))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
  1. Over SSH, install dependencies and run the migrations:
source ~/virtualenv/mysite/3.12/bin/activate && cd ~/mysite
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
python manage.py createsuperuser
touch tmp/restart.txt

The full walkthrough, with fixes for common errors, is in the Django deployment guide.

Limits to know up front

  • Celery and Redis: Redis isn’t offered per account, so Celery won’t run in its usual setup. For scheduled work, run a management command from cron; for long jobs, use a worker that reads from a database table and is kept alive by cron.
  • Channels and WebSockets: Django Channels needs an ASGI server such as Daphne or Uvicorn, which isn’t available through Passenger. Regular Django views, async views included, work over WSGI.
  • Packages that compile: some, such as mysqlclient, build C code during install. There’s no root access to add system libraries, so if a build fails, read the full error before switching packages.
  • No Docker, no root: the project runs in a virtual environment, not containers.
  • Per-account resources: Passenger may stop the app after a quiet spell, so the first request afterwards is a little slower.

On ArabyHost

Pick an AI/Developer plan, create the database and the app, then deploy from GitHub. You get Python up to 3.12, the LiteSpeed web server, free SSL issued automatically, daily JetBackup backups and CageFS isolation for your account. If you see Web application could not be started, check the Passenger app error page or ask the Araby AI assistant to read the error log and explain the cause. You can also run Claude Code or Codex over SSH to finish the setup, and support is available in Arabic.

FAQ

Can I host a Django project on cPanel hosting?

Yes, if the plan supports Python apps. On ArabyHost that means the AI/Developer plans, where Setup Python App creates the virtual environment and runs the project through passenger_wsgi.py.

Why is my CSS missing after deploying?

With DEBUG=False, Django no longer serves static files itself. Set STATIC_ROOT, run collectstatic, then serve the files from a public folder of the domain or with WhiteNoise.

Does Celery work on this hosting?

Celery needs a message broker such as Redis or RabbitMQ, and Redis isn't offered per account. For simple background work, use Django management commands run by cron, or a worker that reads jobs from the database.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.