India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

Hosting a database Driven Website

Hosting a database Driven Website

Hosting a data base driven website on a Cpanel hosting as offered by Truehost is simple.

They only difference between hosting a non-database driven website and website driven website is that a database driven website require database set up and upload.

Setting up database for a website, during web hosting

Login to your Cpanel using credentials provided by Truehost Kenya.

Basically mean clicking on the Cpanel url or http://www.serveripaddress/~yourusername/cpanel

Input your username

Input your password


On successful login, proceed to click mysql databases icon in the Cpanel
Creating a database

Under create database

Give your database a name

Click create database

Database name will therefore be your username_newnameyouhavegiven


Adding User to a new database

Online databases do not use the root user as default on localhost (local development phpmyadmin)

Under add new user

Indicate username

Username should have fewer than 7 characters

Input a desired database password

I recommend to use password creator to have a strong password.

At this point make sure you have saved your database name, your database username and your database password in a text file for use in your website.


Adding user to your database

Under Add a User to a Database

Selected the user you have created

Select your database

Click Add to add

It prompts you for roles to issue you database user

You may select all

Then presses add to finalize.

Uploading Database

Make sure you have exported your database from your localhost (local development environment) to a .sql file or .zip file if you are dealing with large database.

From your Cpanel Home

Click on phpmyAdmin icon

It will open in a new tab

Choose the database created earlier from the left side panel

Click on the database

Click on import option

Browse the location of your exported database

Select database file to import

On Successful import – you will have uploaded your database

Upload the files in the normal way as illustrated in the upload of non-database driven website tutorial

Ensure database connection or config files of your website reflect the new database name, new database user, new database password

Server should remain localhost unless advised otherwise by Truehost team.


Bingo – u r live now.


Share some Love
× WhatsApp us