Pages Managerfor WHMCS · Documentation
v7.0.0

External Pages & Deployment

External pages are fully standalone HTML pages served from their own domain or subdomain — completely outside the WHMCS theme and URL.


Key concept — external pages are not served on the WHMCS URL. Each external page is rendered to a real .tpl file and deployed as a self-contained site using the bundled index.php + config.php + .htaccess — the perfect fit for sales pages, landing pages and marketing pages that should not look like WHMCS.

What gets deployed

A deployed external site is a folder on a domain/subdomain of your choice, containing:

  • index.php — the standalone router/controller that renders each page.
  • config.php — points the standalone site at your WHMCS installation (see config.php).
  • .htaccess — serves the homepage at the root and routes pretty URLs.
  • templates/external/<name>.tpl — the rendered page files.

At runtime the module keeps the rendered copies at modules/addons/page/templates/external/<name>.tpl. You upload these (or let the module sync them) to your deployment folder.

config.php

The standalone site needs to know where your WHMCS installation lives so it can pull shared assets and system variables. Edit config.php and set $whmcs_dir to your WHMCS root:

<?php
/**
 * Pages Manager - External site configuration
 * Set the absolute path to your WHMCS installation.
 */
$whmcs_dir = '/home/user/public_html/whmcs';

The deployed controller then uses $whmcs_dir to load shared styles, system URLs and company details.

Deploying the site

  1. Create/edit your External pages in the module (Header, Footer, Homepage + any extra pages). Note the three protected shell rows — Page Header, Page Footer and Homepage — which cannot be renamed or deleted.
  2. The module renders every external page to modules/addons/page/templates/external/<name>.tpl.
  3. Copy the bundle (index.php, config.php, .htaccess) plus the templates/external/<name>.tpl files to your target site root (outside WHMCS).
  4. Edit config.php and point $whmcs_dir at your WHMCS root.
  5. The Homepage is served at the domain root; every other page at /index.php?p=<name> or, with the bundled .htaccess, at the pretty form /<name>.html.
Example layout — with WHMCS in a subfolder such as https://yourdomain.com/support/, the External Homepage becomes the landing page of that subfolder (https://yourdomain.com/support/), so visitors land on a branded page instead of the raw client area — with the client area still one click away.

Rendering & rebuild

Each external page is rendered from its Page Header + content + Page Footer using the variables and {$nav} menu. Rebuilding:

  • Publish / unpublish regenerates the rendered .tpl.
  • Editing the Header / Footer / Homepage shells triggers a re-render of all external pages that use them.
  • The Clear Template Cache action flushes compiled Smarty output so template edits show up immediately.

See How Pages Are Served for the full request flow of internal vs external URLs.