Install and run Python Django using cPanel

This tutorial explains how to use Django framework.

Step One:

  1. Login to your cPanel account.
  2. Click on “Setup Python App”


Step Two:

  1. Select Python version from the drop-down list.
  2. Specify your application directory.
  3. Click “setup” button.

Step Three:

  1. Go to “modules” and click on “Show”.
  2.  Type “Django” and click on it.
  3.  Select the desired Django version.
  4. Click “Add”.
  5. Click on “Update” button followed by restart button.



Step Four:

  1. Edit “.bash_profile”. You can do that from cPanel –> File Manager.
    Make sure that “Show Hidden Files (dotfiles)” is selected from File Manager –> Settings.
  2. Add the following line at the bottom and save:
    source virtualenv / NN / VV / bin / activate
    Where NN is the folder that is created in Step Three, and VV is the version of Python.


Step Five:

  1. Go back to “Setup Python App”
  2.  Click on “Edit” next to “WSGI file location” and add the path.
    ie. python/




If you can not find “Setup Python App” icon in cPanel, please contact support to enable it.

  • Was this Helpful ?
  • Yes   No

Comments 5



my step after install django (view default django worked ), but after create project

i have an error ‘The server encountered an unexpected condition which prevented it from fulfilling the request.’

on step 5, my path is on folder project ‘/home/autogila/pythonsite/pythonsite/’.
so, i am edited my python setup like ‘/home/autogila/pythonsite/’

what’s the problem with it?


Chris Shaw


Good Day, I have found this article when searching for how to host Django 1.10 on my hosting provider. I had done all the steps, and it almost works. But when I try to log into the admin, or send any post to any app, Django only seems to look though the root urls, not the apps or admin, so always returns a 404. This is very frustrating. Is there something I am missing?


Ahmed Shibani


Hello Chris,

This is most likely an issue with the file. Double check that the admin and app urls are included or post it here to take a look.





i was wondering why when i open my app uri it takes so damn long, and throws me an 500 RTO error. i have followed all your instructions, and read on the other websites too, but still i have no idea why. please help me because this is my first time using python app on real website.

thank you.


Ahmed Shibani



A 500 error indicates either there was not enough resources to handle the request or there is some kind of loop causing the process to run out of allowed time to execute. I’d recommend you check your is correct, you can also enable Django debug mode, this might provide you with more information.


Leave a comment

Required fields are marked