Installation Guide

From TheHostingTool Wiki
Jump to navigationJump to search

Welcome to the THT Installation Guide! This installation guide will show you step-by-step how to install TheHostingTool on your WHM server! A gallery of the installation steps is available below.

Step 1: Upload

Method A: cPanel

You can use cPanel's File Manager to upload and extract the THT archive. Log into cPanel, enter the File Manager, navigate to the folder you want to install THT to, and click on Upload. Upload the file and go back to the File Manager. Click on the file, extract the archive and remove the documentation and ZIP archive. Enter the 1.2 folder created, select all files, move it to the directory you'd like THT to be in, navigate to the folder, then remove 1.2

Method B: FTP

Extract the 1.2 folder from the archive. Open it in your file manager (Windows Explorer, for example) and drag-and-drop all the contents into an FTP window. The FTP window should be connected to your server on your WHM site, and should be navigated to the folder you want TheHostingTool to be in. Filezilla is an FTP client you can use. On Linux, you will need to navigate to the folder you extracted the files to in the left-hand panel, then drag-and-drop the files and folders in.

Step 2: Create Database

Using phpMyAdmin, cPanel, command-line, etc., create a database for TheHostingTool. We'll name ours "THT" for our tutorial.

Step 3: Install

Insert your MySQL details.
Set up a staff account and provide the URL.

Open up your browser and load the site where THT is being set up. We will be in, let's say, http://localhost/tht

If it tells you to, make sure you create a file manually and chmod it to 666. Make sure that the installer is set to "Install" and not "Upgrade." Click Next. You will be asked for MySQL details. For our example:

  • Hostname: localhost
  • Username: root (do not use root when actually setting up THT!)
  • Password: (none) (add a password when actually installing THT!)
  • Database: tht
  • THT Prefix: tht_ (this doesn't have to be changed)

THT will now insert the data it needs to operate. Once that is completed, you will be in Step 4. For the THT URL, we need to use since we need the trailing slash and we can't use localhost as THT will link to localhost, which does not exist for most or all of your clients. Set up your username, password, email and name and you should be done!

Step 4: Finished!

You are now finished with your THT installation. You can now browse your THT site and begin configuring it (see below).


All you need to do is select Upgrade once the appropriate files are removed or uploaded.

When upgrading, go to Step 3, but instead of selecting "Install" at the first step, select "Upgrade." Each upgrade may require removing or uploading new files. Read the Readme file in each upgrade before you proceed. Please also note any instructions given in the release post on the community forums.

Post-install Configuration

It's simple to create a server in TheHostingTool.

Step 1: Servers

Go to and log into the Admin CP in TheHostingTool. In the Sidebar Menu is an entry for Servers. Enter the Server configuration area and click on "Add Server." Name your server (we will name ours Node 1) and use localhost for your server. Change this if it needs to be changed, but it doesn't have to be changed most of the time. For the username, use your reseller username. If you use DirectAdmin, set the type accordingly. If you use cPanel/WHM, change the type to cPanel/WHM.

Method A: DirectAdmin

If you are using DirectAdmin, for password, enter your reseller password.
NOTE: This section may need improvement. The author does not have DirectAdmin.

Method B: WHM

For Access Hash, enter the hash you got from WHM. If you do not have an Access Hash, log into WHM, enter Cluster/Remote Access and go to Setup Remote Access Key. Generate a new access hash, copy it to your clipboard, then paste it into THT.

Step 2: Subdomains

At least one subdomain is required so users who don't have a domain can access their site.

While still in THT, go to the sidebar menu and enter Subdomains. For each domain you have (let's say we have and, go to Add Subdomain and enter the domain in the Domain field. Let's say we're using cPanel/WHM and have 5 different nodes. We can associate a different domain with a different node.

Step 3: Packages

To create a package, you need your backend package name.

Now go to the sidebar menu and go to Packages. For each package you have in WHM or DirectAdmin, go to Add Packages. For the name, put whatever you want. Let's put Package A. For backend, put the name of the package assigned in WHM/DirectAdmin, for example whmhost_A. Put whatever you want for the description. The space, bandwidth and number of databases would be great. For type:

  • Free -- no payment required
  • Post2Host -- users must post a certain number of posts on your forum per month
    • Signup Posts: Users must have this many posts when they sign up
    • Monthly Posts: Users must have this many posts every month
  • Paid -- Users must pay with legal currency

If we had more than one node, we'd select that node. Let's say we only have Node 1, so we leave it at Node 1. If you want to vaidate each request, check Admin Validation. If it is a reseller, check the reseller box. You can now add the package.

Step 4: Install the Cron Job

Adding the cronjob from cPanel 11.25.

To set up the cron job to update Post2Host/Paid Invoices, go into cPanel, scroll down to Advanced, and select Cron Jobs. Assuming you're using cPanel 11.25, under "Add New Cron Job,":

  • For Common Settings: Select Twice a day (0 0, 12 * * *)
  • For Command: For most users, this will be "php -q /home/[username]/public_html/[tht_directory]/includes/cron.php"
    • Remember to substitute the appropriate values where you see brackets
    • If php -q does not work, try php -f