A List of SMTP and IMAP Server

Default Ports:Server:Authentication:Port:
SMTP Server (Outgoing Messages)Non-EncryptedAUTH25 (or 587)
 Secure (TLS)StartTLS587
 Secure (SSL)SSL465
IMAP Server (Incoming Messages)Non-EncryptedAUTH143
 Secure (TLS)StartTLS143
 Secure (SSL)SSL993

Googlemail – GmailServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.gmail.comSSL465
IMAP Server (Incoming Messages)

Please make sure, that IMAP access is enabled in the account settings.
Login to your account and enable IMAP.
You also need to enable “less secure apps” (third party apps) in the Gmail settings:
See also: How to enable IMAP/POP3/SMTP for Gmail account

SMTP Server (Outgoing Messages)smtp-mail.outlook.comStartTLS587
IMAP Server (Incoming Messages)imap-mail.outlook.comSSL993
SMTP Server (Outgoing Messages)smtp.office365.comStartTLS587
IMAP Server (Incoming Messages)outlook.office365.comSSL993
 Note: If the above settings are not working for your account, then login into the outlook web app, go to the “Settings” > “Options” > “Account” > “My Account” > “Settings for POP and IMAP Access”.
Yahoo MailServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.mail.yahoo.comSSL465
IMAP Server (Incoming Messages)imap.mail.yahoo.comSSL993
Yahoo Mail PlusServer:Authentication:Port:
SMTP Server (Outgoing Messages)plus.smtp.mail.yahoo.comSSL465
IMAP Server (Incoming Messages)plus.imap.mail.yahoo.comSSL993
Yahoo Mail UKServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.mail.yahoo.co.ukSSL465
IMAP Server (Incoming Messages)imap.mail.yahoo.co.ukSSL993
Yahoo Mail DeutschlandServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.mail.yahoo.comSSL465
IMAP Server (Incoming Messages)imap.mail.yahoo.comSSL993
Yahoo Mail AU/NZServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.mail.yahoo.auSSL465
IMAP Server (Incoming Messages)imap.mail.yahoo.auSSL993
SMTP Server (Outgoing Messages)smtp.aol.comStartTLS587
IMAP Server (Incoming Messages)imap.aol.comSSL993
SMTP Server (Outgoing Messages)smtp.att.yahoo.comSSL465
IMAP Server (Incoming Messages)imap.att.yahoo.comSSL993
NTL @ntlworld.comServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.ntlworld.comSSL465
IMAP Server (Incoming Messages)imap.ntlworld.comSSL993
BT ConnectServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.btconnect.com 25
IMAP Server (Incoming Messages)imap4.btconnect.com 143
O2 DeutschlandServer:Authentication:Port:
SMTP Server (Outgoing Messages)mail.o2online.de 25
IMAP Server (Incoming Messages)imap.o2online.de 143
T-Online DeutschlandServer:Authentication:Port:
SMTP Server (Outgoing Messages)securesmtp.t-online.deStartTLS587
IMAP Server (Incoming Messages)secureimap.t-online.deSSL993
1&1 (1and1)Server:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.1and1.comStartTLS587
IMAP Server (Incoming Messages)imap.1and1.comSSL993
1&1 DeutschlandServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.1und1.deStartTLS587
IMAP Server (Incoming Messages)imap.1und1.deSSL993
SMTP Server (Outgoing Messages)outgoing.verizon.net 587
IMAP Server (Incoming Messages)incoming.verizon.net 143
zoho MailServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.zoho.comSSL465
IMAP Server (Incoming Messages)imap.zoho.comSSL993
SMTP Server (Outgoing Messages)smtp.mail.comStartTLS587
IMAP Server (Incoming Messages)imap.mail.comSSL993
SMTP Server (Outgoing Messages)smtp.gmx.comSSL465
IMAP Server (Incoming Messages)imap.gmx.comSSL993
Net@ddress by USA.NETServer:Authentication:Port:
SMTP Server (Outgoing Messages)smtp.postoffice.netSSL465
IMAP Server (Incoming Messages)imap.postoffice.netSSL993
+ Add ProviderServer:Authentication:Port:
SMTP Server (Outgoing Messages)Contact us to add your provider  
IMAP Server (Incoming Messages)  

How to order UK reseller hosting with free WHMCS and Private Nameservers

Our tutorial that will help you to start your own web hosting business with our UK reseller hosting plan.

Reseller Hosting Guide to help you order UK reseller web hosting from our website https://www.webhostuk.co.uk/reseller-hosting.html

WebHostUK offers white-labelled reseller hosting with free Private Nameservers, free WHMCS billing system (on selected plans), free ENOM reseller account and much more, with one of the best 24/7 support available via live chat and ticket helpdesk!

How to order reseller hosting with free WHMCS and private nameserves?

Our guide will help you start your own web hosting business in less than 10 minutes.

Reseller Hosting Setup Guide will help you with:
1) Choose and order a domain name for your web hosting business
2) Select your reseller hosting plan with us
3) Setup white-labelled private nameservers to represent your web hosting brand
4) Login to reseller WHM and setup your Web Hosting packages
5) Create your first customer under your reseller account.

If you need any more assistance while ordering our reseller hosting plans, please feel free to visit our website at https://www.webhostuk.co.uk and initiate a live chat with one of our 24/7 support engineer!

How to configure email in Outlook on Windows 10?

Our tutorial that will help you to configure email in your Outlook email client on a Microsoft Windows 10 machine

Tutorial to configure email in Outlook on Windows 10 computer.

You will first need an active account with us. Please visit https://www.webhostuk.co.uk/web-hosting.html to signup with one of our web hosting plans.

You can now login to your client portal at https://secure.webhost.uk.net

Go to Services to manage your web hosting product with us. It will allow you to create email account in your cPanel.

As an example if your domain name is webhost-uk.net (this is just an example for reference purpose, please replace it with your valid domain name) then your email client configuration details will be:

Incoming POP3 Server : mail.webhost-uk.net
Incoming POP3 Secure port: 995
Incoming POP3 non-ssl port: 110

Incoming IMAP Server : mail.webhost-uk.net
Incoming IMAP Secure port: 993
Incoming IMAP non-ssl port: 143

Incoming SMTP Server : mail.webhost-uk.net
Incoming SMTP Secure port: 465
Incoming SMTP non-ssl port: 25 or 587

Enter your full email address as your username and its respective password that you configured in cPanel.

That’s all!! and you should be good to send and receive email from your Outlook on your Windows 10 computer!

For any further help, please do not hesitate to initiate a livechat with our 24/7 support from our website https://www.webhostuk.co.uk

Fix CPU Overload / Abuse Issues ?

Most common things you need to follow will be:

1. Adding cloudflare for your domains which will protect your domains from Unwanted Traffic/Attack/Bot Access 

2. Add robots.txt to understand Search engines to crawl your sites.There are lot of Crawl bots which will give unwanted traffic to your websites which will also cause Overloading on servers like (EP hits)

So create an robots.txt file under your public_html and place the below code : 

User-Agent: *
Disallow: /User-Agent: Googlebot
Allow: /

If you want to add any other search engines to crawl your site you can add it in the above code 

Follow the Above steps for all your domains which is an recommended thing !

For WordPress Users kindly change the File permission of 2 files under your WordPress root wp-cron.php and xmlrpc.php to Permission 000

You can change it from your cPanel > Filemanager As these 2 files will cause overloading on servers by giving unwanted traffic 

Add Heart Beat Plugin to control the admin-ajax.php Once installed WP Admin > Settings > Heartbeat Control > Disable the heartbeat for All 3 Options and click save

Add loginizer which will protect your sites from WP Login attacks (These attacks on most common your websites will be facing daily) So its best way to change your  WP Admin portal URL (VERY RECOMMENDED)

Keep your WP Core,Plugins,Themes Up to date

Remove any Un-used themes or plugins

Don’t use Jetpack Plugin as it will Eat the Resource

How to order a Domain name and UK web hosting for your website?

You can now order your preferred domain name for your website along with UK web hosting services, to get your website published in just a few minutes.

Below tutorial will guide you to select your domain name and order web hosting services at WebHostUK Limited

To get started, please visit our website at https://www.webhostuk.co.uk

Select the desired type of hosting such as :

Cloud Hosting: https://www.webhostuk.co.uk/web-hosting.html or

WordPress Hosting: https://www.webhostuk.co.uk/wordpress-hosting.html or

Reseller Hosting : https://www.webhostuk.co.uk/reseller-hosting.html or

Managed VPS server : https://www.webhostuk.co.uk/vps-hosting.html or

Managed Dedicated Server: https://www.webhostuk.co.uk/dedicated-hosting.html and many more.

Today, we will order a shared hosting plan ..

Lets order Linux Standard Cloud Plan which costs £14.99 per year + VAT

To get started please visit https://www.webhostuk.co.uk/web-hosting.html

Click on “Order Now” button below “Linux Standard Cloud” plan

Choose your domain option:

1) To register a new domain, select “Register a new domain” 2) To transfer your existing domain from your old registrar over to us, select option “Transfer your domain from another registrar ” 3) To keep your domain with your old registrar and use our nameservers, select “I will use my existing domain and update my nameservers “.

Let’s choose to register a new domain. So select option 1 and enter your desired domain name. You can also select your desired TLD (such as .co.uk or .com etc) from the dropdown menu. Click “Check” and the wizard will search for domain availability. If it is available, it will show a “Congratulations” message..

Click on “Continue” Select your preferred billing term for web hosting, such as Annual, Biennial or Triennial. You can also choose from several addons that you can select along with web hosting. Click on “Continue” to proceed to next step.

You will be asked to configure your domain details. Enter your valid details and click on “Continue”

This is the final screen which says “Review & Checkout”. Here you can see the web hosting product billing duration that you selected earlier. Below you will see your domain name. By default it will be registered for 1 year. However, you can increase your domain registration to longer duration such as to 2 / 3 years.

Click on “Checkout” Enter your valid details such as Name, Address, and select mode of payment to finalize your order.

Voila … Thats it..!! Your order will now get processed on successful completion of our automated fraud check system. You will then receive all login details for your order which will help you to login to your client portal and cPanel. If at any stage you need any help, you are most welcome to visit our website at https://www.webhostuk.co.uk and initiate a live chat with our 24/7 live chat support person!

MySql offline error in cPanel

We have recently noticed, Mysql error poping up in cPanel when trying to access “Mysql Databases” tool.

The error mentions about “The MySQL server is currently offline” and also about mysql privileges warning such as “Error encountered while fetching data: There is no such grant defined for user ‘xxxx’ on host ‘localhost’ DBDISKUSED yyyyy 1909382 DISKUSED 1909382 DB zzzzzz DBUSER USER xxxxxx

We are aware about the error which is due to changes in grants in MariaDB 10.3.23. cPanel team is working on the above error and they also have updates posted at:




Please note that while the interface indicates it is down it is only the interface the server is still running.

We do not have any ETA as this is a bug with cPanel and as per their update, they are working actively to resolve the error. We will post more updates when we have one.

Setup WordPress Security Plugin Wordfence

How to Install and setup the Wordfence Security plugin in WordPress.

First thing you need to do is install and activate the Wordfence Security plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Wordfence Setup – WebhostUK

Setting up the Wordfence Security plugin is very simple, but there are a few areas you really wanna make sure are running, like the Firewall.

Click on Wordfence on the left-hand admin panel and select the Dashboard option. This will pull up the main settings page of the plugin. All of the information you need to see is on this page including the last scan, malware blocked, IP addresses blocked, etc.

Wordfence Setup – WebhostUK

The most important part of this security plugin is the Firewall. It will prevent most malicious activity on your website. This is a PHP based application level firewall.

The Wordfence firewall offers two levels of protection. The basic level which is enabled by default allows the Wordfence firewall to run as a WordPress plugin.

This means, that the firewall will load with rest of your WordPress plugins. This can protect you from several threats, but it will miss out on threats that are designed to trigger before WordPress themes and plugins are loaded.

The second level of protection is called extended protection. It allows Wordfence to run before WordPress core, plugins, and themes. This offers a much better protection against more advanced security threats. Click on the Firewall option to access its settings page.

Wordfence Setup – WebhostUK

Click on the Optimize the Wordfence Firewall button. It will run a test to determine the best setting to use. You may pick your own setting, but I would recommend following Wordfence’s recommendation.

Wordfence Setup – WebhostUK

You may pick your own setting, but I would recommend following Wordfence’s recommendation. Click on the Continue button once you have made your selection.

Click on the Download .htaccess button. This will allow Wordfence to run before your core WordPress files. This adds an extra layer of protection because a firewall cannot protect these files making them vulnerable to hackers. Click on the Continue button once you have the file downloaded.

Wordfence Setup – WebhostUK

You will also notice a Learning Mode button. When you first install Wordfence, it attempts to learn how you and your users interact with the website to make sure that it doesn’t block legitimate visitors. After a week it will automatically switch to Enabled and Protecting mode.

Wordfence Setup – WebhostUK

To scan your website at any time, click on the Scan option.

Wordfence Setup – WebhostUK

Click on the Start a Wordfence Scan button. The free version comes with a default automatic 24-hour scan. If you upgrade to the premium version you can set your own schedule and much more. Once the scan is complete you will see a full list of problems it has found.

Wordfence Setup – WebhostUK

The scan will look for changes in file sizes in the official WordPress core and plugin files.

It will also look inside the files to check for suspicious code, backdoors, malicious URLs, and known patterns of infections.

Typically these scans need a lot of server resources to run. Wordfence does an excellent job of running the scans as efficiently as possible. The time it takes to complete a scan will depend on how much data you have, and the server resources available.

You will be able to see the progress of the scan in the yellow boxes on the scan page. Most of this information will be technical. However, you don’t need to worry about the technical stuff.

Once the scan is finished, Wordfence will show you the results.

It will notify you if it found any suspicious code, infections, malware, or corrupted files on your website. It will also recommend actions you can take to fix those issues.

There are many other sections to be aware of. You can view the live traffic feed by clicking on the Live Traffic option. Wordfence Live Traffic shows you what is happening on your site in real-time, including user logins, hack attempts, and requests that were blocked by the Wordfence Firewall. You can choose to log security-related traffic only or all traffic.

Traffic is logged directly on the server, which means it includes visits that don’t execute JavaScript. Google and other JavaScript-based analytics packages typically only show visits from browsers that are operated by a human, while Live Traffic can show visits from crawlers like Google and Bing.

Here you can see the list of IPs requesting different pages on your website.

Wordfence Setup – WebhostUK

This will show you how well Wordfence is defending your website. The Blocking option will allow you to see who is being blocked and allow you to manually enter an IP address to be blocked.

If you have the premium version you can also block entire countries from accessing your website. Explore these sections to see everything they offer.

Wordfence Setup – WebhostUK

Click on the Options option. This will allow you to tweak the Advanced settings that can be found by scrolling down the page.

These settings are all up to you, but should all be considered when setting this plugin up.

Wordfence Setup – WebhostUK

Congratulations, you have successfully installed and set up the Wordfence Security plugin. You can change your settings and scan your website at any time. Remember there are many features that are exclusive to the premium version of Wordfence and you can upgrade at any time, but the free version will be able to guard your website without any issues.

Install Wordfence Plugin

Installing Wordfence is Both Quick and Simple

With little more than the click of a few buttons, you will have Wordfence up, running and proactively securing your WP site. Once Wordfence is active, it will begin your first security scan and cleanup. You will be able to quash any current threats and begin to prevent future site breaches, too.

Get started with Enterprise-Class Security now, You can install Wordfence with these four best-practice steps:

  1. Sign into your own WordPress website. You’ll usually go to something like www.example.com/wp-admin/ and sign-in

2. Replace example.com with
your own website’s URL

3. Now that you’re signed in and ready to administer your own site, go to Plugins, Add New and do a search for ‘wordfence’ without quotes

5. Click the “Install Now” link and
Wordfence will be installed

When you decide to upgrade to the best WordPress Security
out there, simply upgrade to Wordfence Premium.

Install and Configure Django on a Linux Shared Hosting

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

  • Ridiculously fast – Django was designed to help developers take applications from concept to completion as quickly as possible.
  • Fully loaded – Django includes dozens of extras you can use to handle common Web development tasks. Django takes care of user authentication, content administration, site maps, RSS feeds, and many more tasks — right out of the box.
  • Reassuringly secure – Django takes security seriously and helps developers avoid many common security mistakes, such as SQL injection, cross-site scripting, cross-site request forgery and clickjacking. Its user authentication system provides a secure way to manage user accounts and passwords.
  • Exceedingly scalable – Some of the busiest sites on the planet use Django’s ability to quickly and flexibly scale to meet the heaviest traffic demands.
  • Incredibly versatile – Companies, organizations and governments have used Django to build all sorts of things — from content management systems to social networks to scientific computing platforms.

You will have a functioning Django site on your account that:

  • Loads a static homepage for the domain.
  • Loads the Django administration interface.
  • Uses a SQLite database.

Create A Python Application In cPanel

The Setup Python App feature allows you to deploy Python applications on your cPanel while running the Apache web server.

You can check the functionality by visiting the cPanel, Setup Python App.

Install and Configure Django

On the next page, you will be able to Create Application and check existing Web applications.

Install and Configure Django

After clicking Create Application you will be presented with the app creation menu:

If you wish to create a new Python application, you must specify the Python version, fill in the Application root, and the Application URL. Then click Create.

Optionally, you can also set up Application startup fileApplication Entry point and Passenger log file.

As soon as the environment is set, you can upload your application files to the application root directory.

When the application is created, you will be able to see the next page:

At the very start, you have the command necessary to enter your virtual environment. This is useful when you need to manually execute some commands either via SSH or with the terminal menu in cPanel.

To be able to do this, you need to enable Shell access as in this guide.

How to Configure the Django project

1) Login to cPanel.

2) You can see the option Terminal under the “ADVANCED” menu. Click the option to open the terminal.

3) If you are accessing the terminal for the first time, a screen will appear with a warning message. Please click on the button proceed.

4) This interface provides command line access to your account on the server. You can now manage the account using CLI

5) Use the command you noted in the above step to activate the virtual environment. For example:

# source /home/username/virtualenv/myapp/3.6/bin/activate

You need to replace username with your cPanel username

The command prompt now starts with (myapp:3.6) to indicate that you are working in the myapp virtual environment with Python 3.6. All of the following commands in this article assume that you are working in the Python virtual environment.

6) Type the below command to install Django:

# cd ~pip

# install django==2.1.8

You can verify the version of Django installed, with the following command:

# django-admin --version

7) Type the below command for creating a Django project:

# django-admin startproject myapp ~/myapp

8) To create directories for the static project files, type the following commands:

# mkdir -p ~/myapp/templates/static_pages 
# mkdir ~/myapp/static_files 
# mkdir ~/myapp/static_media

a. Find the ALLOWED_HOSTS line and then modify it as below. Replace example.com with your own domain name:

ALLOWED_HOSTS = [‘example.com’]

b. Find the TEMPLATES block, and then modify it as below:

‘BACKEND’: ‘django.template.backends.django.DjangoTemplates’,
‘DIRS’: [os.path.join(BASE_DIR,’templates’)],
‘APP_DIRS’: True,
‘context_processors’: [

c. Locate the STATIC_URL line, and then add the below lines beneath it:

MEDIA_URL = ‘/media/’
MEDIA_ROOT = os.path.join(BASE_DIR, “static_media”)

STATIC_URL = ‘/static/’
STATIC_ROOT = os.path.join(BASE_DIR, ‘static_files’)

9) Open the ~/myapp/myapp/urls.py file using the text editor. Delete the existing text and copy the below text into the file:

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import url
from django.views.generic.base import TemplateView

urlpatterns = [
path(‘admin/’, admin.site.urls),
url(r’^$’, TemplateView.as_view(template_name=’static_pages/index.html’), name=’home’),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

10) Open the ~/myapp/passenger_wsgi.py file and do the following changes. Replace username with your own account username:

import myapp.wsgi
SCRIPT_NAME = '/home/username/myapp'

class PassengerPathInfoFix(object):
    Sets PATH_INFO from REQUEST_URI because Passenger doesn't provide it.
    def __init__(self, app):
        self.app = app

    def __call__(self, environ, start_response):
        from urllib.parse import unquote
        environ['SCRIPT_NAME'] = SCRIPT_NAME

        request_uri = unquote(environ['REQUEST_URI'])
        script_name = unquote(environ.get('SCRIPT_NAME', ''))
        offset = request_uri.startswith(script_name) and len(environ['SCRIPT_NAME']) or 0
        environ['PATH_INFO'] = request_uri[offset:].split('?', 1)[0]
        return self.app(environ, start_response)

application = myapp.wsgi.application
application = PassengerPathInfoFix(application)

11) Use a text editor to create a basic index.html file in the ~/myapp/templates/static_pages directory.

The file can be as simple as a text file that says Hello world.

12) Type the following command:

# python ~/myapp/manage.py migrate

13) Create and set up the superuser account:

  • For this, type the below command:

# python ~/myapp/manage.py createsuperuser

  • Type the administrator username at the Username prompt and then press Enter.
  • Type the administrator e-mail address at the Email address prompt and then press Enter.
  • Type the administrator password at the Password prompt and then press Enter.

14) To collect the static files, type the below commands:

# python ~/myapp/manage.py collectstatic

In case you are asked for overwriting existing files, type yes and then press Enter.

15) Restart the Python application in cPanel:

  • Log in to cPanel.
  • Click Setup Python App in the SOFTWARE section of the cPanel home screen.
  • Locate the correct application under the Existing applications and then click Restart.

16) Test the Django site:

  • Go to http://www.example.com, where example.com represents your domain name. The index.html file should load.
  • Go to http://www.example.com/admin, where example.com represents your domain name. The Django administration login page should be displayed. Use the superuser credentials that you created earlier to log in.

If there a problem for the website to appear in your browser, run the passenger_wsgi.py file manually. For this, type the below command:

# python ~/myapp/passenger_wsgi.py

When you run this file, you should get any text output to the console. In case there are any errors, check the syntax in the configuration files.

That’s all! Now, you can easily install and configure Django on a Linux shared hosting account.

Setup Python App

The Setup Python App feature allows you to deploy Python applications on your cPanel while running the Apache web server.

You can check the functionality by visiting the cPanel, Setup Python App.

Install and Configure Django

On the next page, you will be able to Create Application and check existing Web applications.

Install and Configure Django

After clicking Create Application you will be presented with the app creation menu:

If you wish to create a new Python application, you must specify the Python version, fill in the Application root, and the Application URL. Then click Create.

Optionally, you can also set up Application startup fileApplication Entry point and Passenger log file.

As soon as the environment is set, you can upload your application files to the application root directory.

When the application is created, you will be able to see the next page:

At the very start, you have the command necessary to enter your virtual environment. This is useful when you need to manually execute some commands either via SSH or with the terminal menu in cPanel.

To be able to do this, you need to enable Shell access as in this guide.

You can change options like Python version, Application root, Application URL, Application startup file, Application Entry point and Passenger log file here.
After changing such options, please make sure to click the Save button on the upper right.

The Python versions available are 2.7 and 3.3, 3.4, 3.5, 3.6 and 3.7.

PLEASE NOTE: Python version switch can take up to 5 minutes.

The Application startup file is to specify the Python WSGI application entry point. It must be specified as a filename.
Application Entry point is there to set up a WSGI callable object for the previously specified startup file.

With the help of the Configuration files field you can install various modules through Pip. Under the Add another file… field you can enter the name of the given module and click Add.

If you click Delete, the corresponding module entry will disappear. If you click Edit, you can change the module in question.

Once you have added the module, you can click Run Pip Install and install the module in question from the drop-down.

You can also execute pip install commands directly under the virtual environment via SSH.

Also, you can execute python script commands from the web interface (e.g. you can install packages from specific repositories or control web applications by means of django-admin).

You can additionally set up Environment variables:

Click Add Variable and you will be able to set up Name and Value of the variable in question. After you have entered the correct data, click Done to create the variable.

NOTE: Changes will not be applied to the application environment until the Update button is clicked. All changes can be reverted by clicking the Reset button.

You also have the options to Stop App and Restart the application.

To delete the application, click Destroy. The application folder itself will remain unmoved.

Dealing with WSGI application issues

In some cases, apps may not run properly when the main application variable is called app. This is because WSGI software that we use to run Python on our servers requires the main application variable to be called application.

We will use the Flask application as an example here to make the application work:

1. Install Flask and all the other modules required for the app. It can be done in many ways:

  • Install modules manually one by one over SSH

This can be done using the standard Run Pip Install button described in this guide, or via SSH using pip install module command.

  • Install all the modules at a time with a requirements.txt file.

It can be done with the following type of command via SSH:pip install -r requirements.txt

  • Install all the modules with a setup.py file via SSH, if it is created for the application,. The usage of this option depends on the app in question.

2. Remove the default passenger_wsgi.py file under the application root folder.
3. Find the main script of the application in the application root folder. Search for the following line to find it:
from app import app
(it can be from src import app or from app import application, however from app import app is the most common way to write it). The main script is usually called app.py, main.py, index.py, or init.py.
4. Rename this script to passenger_wsgi.py or set it in the Application startup file field within the Python App interface in cPanel.
5. Right below the import line (from app import app), insert this line:
application = app

The described actions should help fix an application that was not written with WSGI software in mind.