Documentation

Flex Host - WHMCS Template

Download

If you have not done so already, please download the latest version of the template package before proceeding.

Requirements

Flex Host is fully compatible with WHMCS version 7.8.3, so please ensure that you have this version of WHMCS software installed on your server. The system requirements for WHMCS software itself can be found here if required.

Installation

To install the template on your WHMCS website, please refer to the following guidance:

Step 1

After you have downloaded the template package from our website, extract the archive to your local computer.

Open the folder and you will find the following contents:

  • Flex Host - WHMCSThemes.com
    • README.txt
    • WHMCS Upload
      • templates
        • FlexHost
      • website-hosting.php

Upload the contents of the folder called WHMCS Upload to your WHMCS directory:

  • WHMCS Directory
    • templates
      • FlexHost
    • website-hosting.php

You can rename the template folder from FlexHost to something else if you prefer.

Step 2

If you want to preview the template before activating it, you can append ?systpl=FlexHost to your URL, for example:

yourdomain.com/index.php?systpl=FlexHost

This will allow you to view the template privately for editing purposes without affecting your live website.

When you are ready to activate it, navigate to your WHMCS Administration panel and carry out the following steps:

  • Go to Setup > General Settings
  • Select FlexHost from the dropdown menu next to the Template option
  • Save the changes

Installation and activation of the template is now complete.

Customization

Please refer to the following guidance which explains how to customize the template to suit your needs:

Editing Content

The template content can be edited by modifying the relevant template file in a code editor.

All template files are located within the template folder:

../templates/FlexHost/

To edit the content within the header and footer areas on each page of the template, you can modify the header.tpl and footer.tpl files respectively.

To edit the content of individual pages, this can be done by modifying the template file that is associated with the page:

Page NameTemplate File
index.phphomepage.tpl
website-hosting.phpwebsite-hosting.tpl

Once you have made your modifications to a template file, simply upload it to your template folder to apply the changes.

Editing Images

Images used in the design, such as the logo, are located within the following directory of the template folder:

../templates/FlexHost/assets/img/

The corresponding retina image set is located within the following folder:

../templates/FlexHost/assets/img-retina/

Retina images are used by devices with high pixel density (e.g. iPhone) to ensure that they display correclty without blurring. For this reason, retina images should be exactly twice as big as the standard image.

For example, if your normal image has dimensions of 100px by 100px, the retina image should be 200px by 200px.

Editing CSS Styles

Instead of modifying CSS files directly, we would recommend placing overriding rules within the following file:

../templates/FlexHost/assets/css/custom.css

Due to its position in the document, this file will take priority over all other CSS files used in the template.

Creating New Pages

Every page in WHMCS requires a PHP file and a corresponding template file. Please follow the guidance below which explains how to create each of these files and how to access/review your newly created page:

Step 1 - PHP File

Create a new PHP file, for example wordpress-hosting.php, and insert the following content:

<?php

	# WHMCS PAGE DATA:

		// Page Title
		$page_title 		= "WordPress Hosting";

		// Template File
		$template_file 		= "wordpress-hosting";

	# BUILD PAGE:
	
		define("CLIENTAREA",true);
		require("init.php");
		$ca = new WHMCS_ClientArea();
		$ca->setPageTitle("".$page_title."");
		$ca->initPage();
		$ca->assign('pagetype', custom);
		$ca->setTemplate(''.$template_file.'');
		$ca->output();

?>

The $page_title and $template_file variable values can be changed to suit the name of your new page.

Once the PHP file has been created, upload it to your root WHMCS directory.

Step 2 - TPL File

It is now necessary to create a template file that will store the content for your new page.

Create a new TPL file, for example wordpress-hosting.tpl, and insert the following content:

<h3>WordPress Hosting</h3>
<p>You can insert the content for your new page here</p>

It's important that the name of your TPL file matches the $template_file variable value specified in the PHP file.

Once the TPL file has been created, upload it to your template folder.

Step 3 - Review Page

Your new page can be viewed by adding the PHP file name to your URL, for example:

yourdomain.com/wordpress-hosting.php

Third Party Resources

You may find the following third party resources useful:

User Support Policy

Unfortunately, our free WHMCS templates do not include user support, so we are unable to provide assistance for any problems you may encounter.

However, all of our paid WHMCS templates include user support as well as other benefits such as additional features, free installation and enhanced documentation.

Troubleshooting

The following guidance explains why errors might occur and how to fix them:

New Template Installations

If you experience an error with a new installation of the template that has not been modified in any way, this will most likely be caused by your WHMCS installation being a different version to the template and therefore not compatible.

As this is a version 7.8.3 template, it's essential to have version 7.8.3 of WHMCS software installed on your website to ensure that everything works correctly. Therefore, upgrading your WHMCS installation should resolve the problem.

It is also possible that the error you are experiencing is caused by the template not being installed incorrectly. Therefore, please refer to the installation instructions above to double check that the steps have been followed correctly.

Modified Template Installations

If you have made modifications to the template and you encounter errors, please try installing a fresh copy of the template to see if the error exists there as well. If it does, please refer to the guidance above relating to new installations.

If the error does not exist on a fresh installation of the template, this will indicate that the problem is related to modifications you have made to the template. It will be necessary to identify the problem code and remove or correct it in order to resolve the issue.