PanelAlpha Documentation
Back Home
Live Demo Get Started

Plan Upgrade

Documentation
    Introduction FAQ Automatic Tester
Getting Started
    Requirements Installation Update Guide SSL Configuration Resetting Admin Password Translations Health Check Diagnostic Mode Additional Configuration
Background Billing
    Introduction Billing System Quick Registration Social Media Login Client Area
Admin Area
    Dashboard Instances Services Users Logs Migrations
Onboarding Methods
    Quick Onboarding Super Quick Onboarding Standard Onboarding
System Configuration
    General Configuration Branding Hosting Servers DNS Servers Email Servers Remote Backups Plans Notifications Automatic SSL Themes, Plugins and Packages
Hosting Server Connections
    Hosting Scenarios PanelAlpha Engine for Docker cPanel Plesk DirectAdmin WP Cloud
Email Server Connections
    Mailcow cPanel
DNS Server Connections
    Cloudflare cPanel DNS Only PowerDNS
Billing Systems Integrations
    WHMCS
Billing Scenarios
    Introduction Single WordPress Instance Predefined WordPress Template Multiple WordPress Instances Cross-Selling Paid Plugins and Themes Cross-Selling Domains Plan Upgrade
Integrations
    Integrated Solutions AWStats Matomo Google Analytics Let's Encrypt Google PageSpeed Insights DB-IP Extendify WithoutDNS
Client Area - Instances
    List of Instances Creating New Instance Importing Existing Instance Instance Details Changing Domain Sharing Instances Monitoring Backups Plugins Advanced Settings
Client Area - Hosting
    Summary Domains FTP Accounts MySQL Databases Cron Jobs File Manager DNS Zone Editor Email Addresses Email Forwarders

# Plan Upgrade

  • Upgrading a plan
  • Workflow
  • Plan and product cnfiguration
  • Service identification logic

Before proceeding further to find the gist, it is of utmost importance to ensure that you are already familiar with the "Introduction" article. This article discusses the necessary steps that must be completed* prior to utilizing the information provided in this section.

*Go back to "Introduction" now.

# Upgrading a plan

PanelAlpha offers a user-friendly method for customers to seamlessly manage plan upgrades directly within the application. When users approach the maximum number of available sites or their hosting space nears capacity, they can initiate an upgrade for their website.

# Workflow

  1. When the end client reaches the limit of their sites, they will get a dashboard notification with information that they cannot create any new instances before they upgrade their plan.
    The button configuration is described in the next section of this article.
  1. Otherwise, just the notification without the redirecting button will be displayed.
  1. In the "My Hosting" section of the PanelAlpha client area, in the top right corner of the 'Plan Usage' table, there is a button that allows upgrading the current plan.
  1. Upgrade your plan from the WHMCS platform level:
  1. Select the product from available, then confirm your decision.
  1. Once the payment is complete, the end user will see the new product active on the list of products/services. Consequently, with the new upgraded product with more instances allowed, the user may follow back to PanelAlpha, via 'Manage WordPress' redirecting buttons, to quickly create new instances within the new upgraded limit.

# Plan and product cnfiguration

  1. Set up the upgrade link in the PanelAlpha admin area → Configuration → Plans → Plan Details page. There type in the hyperlink that will redirect the end user to a page where they can upgrade their current plan.
  1. In your WHMCS, create a base of products that will be offered to PanelAlpha clients to upgrade their plan.
  1. It is important to create products with different plans assigned and different limits set up.
  1. When the product settings are ready, move to the Upgrades tab, and select packages which will be allowed for clients to upgrade. When ready, clients redirected form PanelAlpha, will be given a choice to select products from within the packages selected in this step.

# Service identification logic

Take a moment now to understand how the process works from the background.

As an administrator, you need to include a link in the Plan details to enable client redirection to WHMCS for upgrade purposes. When the "Upgrade" button is pressed in the PanelAlpha Hosting details, this URL is utilized, with a unique ID number added to the link.
For example:
Saved upgrade URL: https://modulesgardencom/index.php/store/wordpress-hosting
Link used for redirection: https://modulesgarden.com/index.php/store/wordpress-hosting?paupgradeserviceid=2
Note that ?paupgradeserviceid=2 has been automatically added!

This is how a hook used for these purposes appears, based on the WHMCS example:

 add_hook('ClientAreaPageHome', 1, function () {
     if (empty($_REQUEST['paupgradeserviceid'])) {
         return;
     }

     $panelAlphaServiceId = $_REQUEST['paupgradeserviceid'];
     $hosting = Hosting::getService($panelAlphaServiceId);
     if (!$hosting) {
         Helper::showPageNotFound();
     }

     global $CONFIG;
     header("Location: {$CONFIG['SystemURL']}/upgrade.php?type=package&id={$hosting->id}");
     exit();
 });