How to install Python App on the Cpanel-based (v78) Shared Hosting (Flask) - NameCheap

How to install Python App on the Cpanel-based (v78) Shared Hosting (Flask) – NameCheap



if you want to run this on any shared hosting like CPanel based should be used this condition: if __name__ == “__main__”: app.run()

if you would want to use Cpanel based any shared hosting provided by such NameCheap you could watch this video on YouTube.

for more about it, please visit my github repository:

27 thoughts on “How to install Python App on the Cpanel-based (v78) Shared Hosting (Flask) – NameCheap

  1. Hello,
    I want to Know I made a Python Django Project {E commercial Website}

    I don't know how to host or deploy my website in my Cpanel.

    ???

  2. Hocam videoya girmezden önce dedim aha yine bir hindistanlı ve ya pakistanlı sonra gördüm şive farklı. öğretici videon için teşekkürler.

  3. I did everything exactly the same but when I visit the app url I get an error saying “We’re sorry, but something went wrong. The issue has been logged for investigation. Please try again later. The error seems to happen as soon as I edit the .py file.

  4. Hi, I have done setup with multiple routes ("/","/test"). But I can only access the root one not /test. can you please help.

    ========================= MY CODE =================
    from flask import Flask

    app = Flask(__name__)

    @app.route("/")

    def hello():

    return "Hello World"

    @app.route("/test")

    def test():

    return "Test World"

    if _name_ == "__main__":

    app.run()

Leave a Reply

Your email address will not be published. Required fields are marked *