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 8



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.




We are not able to get this working

WE are facing below error …

We’re sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.

Technical details for the administrator of this website
Web application could not be started
Error ID:
Web application could not be started by the Phusion Passenger application server.

Please read the Passenger log file (search for the Error ID) to find the details of the error.

You can also get a detailed report to appear directly on this page, but for security reasons it is only provided if Phusion Passenger is run with environment set to development and/or with the friendly error pages option set to on.

For more information about configuring environment and friendly error pages, see:

Nginx integration mode
Apache integration mode
Standalone mode

Can you please help me to get this resolved.


Ahmed Shibani


Hi George

I just checked the URL you provided and I can see you have already fixed the issue.

Thanks for stopping by.




how can I serve my media with debug=false ??


Leave a comment

Required fields are marked