Deploy Django App on cPanel HelloWorldHost

Django is one of popular Python Web Framework in the world. But, not all shared hosting allow/support for python hosting with easy integration. Here, we will show you how to deploy a django app / cms on cPanel hosting in HelloWorldHost.Com. In this case, we provide you how to deploy django sample app from
  • First, you need create python app on cpanel, follow this article

  • Next, Install the requirements. You can read the requirements on For installing the requirements, you can use an app setup interface through cpanel or by running command pip install -r requirements.txt that provide from the app
  • Clone the project from github into your app folder. Then move all of the project file into app folder
  • If you not install all requirements throught python app setup interface on cpanel, you can run the following command
    (djapp:3.5)pythonapp@hebe [~/djapp] # pip install -r requirements.txt
  • After that you need to create database before make migration for the app. Visit thist article to create the database
  • Edit the section database, fill with database and database user you created then save.

  • Regarding the readme of project, you need to run 2 command migration

  • Next, you need to define the wsgi file in the App Setting. Go to cPanel, open the Setup App Python Menu. Edit the WSGI File Location
    Find full path with pwd command 

    copy the full path to the form. then save.
  • Update the App Setting  by clicking Update Button.
  • Then restart the App
  • After restart, you can access the url in browser to see the output of the app. If you get broken layout like below, you just need to add symlink directory to the static folder in your public_html
  • Add the symlink static forlder to public_html
  • Access the web again
That's all the step to deploy django app on Hello World Host.

Hai trovato utile questa risposta?

 Stampa Articolo

Leggi anche

Fix static/media file not loaded

If you get problem with static or media file when hosting django app on our hosting, you just...

Create Python App on cPanel HelloWorldHost

How to create an Python App on Hello World Host? Here six step how to create python app on cPanel...

Deploy A Flask App (Flaskex) on cPanel HelloWorldHost

Flask is one of popular Python Microframework in the World. Not all of share hosting can provide...

Fix Error DisallowedHost at / Invalid HTTP_Host Header

Fixing error DisallowedHost at / Invalid HTTP_HOST Header, you need to set ALLOWED_HOST value in...

Powered by WHMCompleteSolution