How to Setup Django on Bluehost Shared Hosting

There are already some guides on setting up Django on Bluehost available on the web. Unfortunately, these guides have become obsolete as technology has progressed. The two main guides that are dated back in 2013 and 2012 no longer work. Bluehost’s own guide is also not enough to get it working.

The primary problem is that the technology used to interface Django with the shared hosting, namely FastCGI, is now considered obsolete by Django. As a result, new versions do not support it.

After a great deal of struggle, I managed to get Django to run on a Bluehost shared hosting website. In this guide, I lay out all of the steps required to get it to work.

Step 1. Your Django Project

If you already have a Django project you want to deploy to your server, you can skip this step. Otherwise, follow the Django tutorial to make a new Django project. This guide will assume you have a Django project ready on your local machine.

Step 2. Installing Python on your Server

Bluehost already provides a python binary. However, you cannot install new Python modules (like Django) using this, due to the restricted directory permissions of shared hosting. Bluehost’s provided python binary is in /usr/bin, but on your shared hosting you can only modify the contents of your home directory.

To begin, SSH into your Bluehost account. Create a new directory for the source files you will download, and a directory to install into: