Knowledge Base

PHP Web Hosting on cPanel

Overview

cPanel is a web hosting platform for static or dynamic pages mainly written in PHP with a local MySQL database.  The pages and database on a site are managed by account local to the cPanel server which are NOT linked to university accounts. We have two servers

Server Site Name
webs.act.reading.ac.uk <username>.webs.act.reading.ac.uk Personal / Development
webhosts.act.reading.ac.uk As requested Research Groups

On the webs.act.reading.ac.uk the site username will be the same as your university username but the password will be local to the server. The sites are provided free of charge but we reserve the right to charge for larger sites. A site name not ending in reading.ac.uk will also incur a charge.

Getting Started

Create a cPanel Account

  1. Go to the portal on https://www.reading.ac.uk/it and put in a ticket to request a cPanel site. We are working on automating the to make it easier.
  2. Once your account has been created you can log into the management portal and explore the options available

 

Howto’s

Transfer files to/from my account

You can transfer files using any of the following three services;

FTP

This service is currently turned off due to a large number of brute force attacks.

File Transfer Protocol is a network protocol used to transfer data between computers over the network/internet.

You can transfer files to your cPanel account using any FTP program that supports authentication from a university computer connected to the LAN. When connecting you will need the following information:

On-line “File Manager”

A web based file manager

  1. Login into the management portal
  2. In the “Files” section, Click “File Manager”
  3. Select the directory to open and Click Go

For a detailed look at File Manager, see this Video Tutorial

Git Repository

You can manage files on your account using git repositories which can be local or clones from a remote repository such as gitlab.act.reading.ac.uk

  1. Login into the management portal
  2. Follow this Video Tutorial

You can deploy files from your git repository either automatically (push)  or manually (pull/deploy)

Setup/Manage a MySQL Database

Setup via MySQL Wizard

  1. Login into the management portal
  2. Follow this Video Tutorial

Setup/Manage Manually

  1. Login into the management portal
  2. Follow this Video Tutorial

Create a Subdomain

You may want to create a subdomain if you wish to put a project into a separate area. I.e http://project1.ab012345.webs.sse.reading.ac.uk

  1. Login into the management portal
  2. Follow this Video Tutorial

Password Protect Directories

Learn how to limit access to a certain part of your site by requiring a user name and password to access a folder or folders from the web.

  1. Login into the management portal
  2. Follow this Video Tutorial

Take a Backup

Download (to your computer) a zipped copy of either your entire site (your home directory, databases) or one of the previously mentioned parts of your site.

  1. Login into the management portal
  2. Follow this Video Tutorial

Install WordPress

  1. Login into the management portal
  2. In the “Software / Services” section, Click “Site Software
  3. In the “Blogs” section, Click “WordPress” button
  4. Follow the on-screen instructions

Send Email from a PHP script

A lot of code out there uses the php mail() function to send mail. You will see code like

This will work but by default the mail server on the cpanel site sends email from nobody@cpanel.sse.reading.ac.uk and if you do not specify a FROM address people will not be able to reply to you.

Using Native PHP Mail Function