Hostinger (hPanel) Integration
Overview
Hostinger is a popular web hosting provider with a modern control panel called hPanel. The Ultimate Multisite Hostinger integration enables automatic domain syncing between Ultimate Multisite and Hostinger's hPanel, allowing you to automatically manage domain mappings and subdomains directly from your WordPress admin.
Features
- Automatic addon domain creation in hPanel
- Automatic subdomain creation in hPanel (for subdomain multisite installations)
- Domain removal when mappings are deleted
- Seamless integration with hPanel's domain management API
Requirements
To use the Hostinger integration, you need:
- A Hostinger account with hPanel access
- An API token from Hostinger
- The following constants defined in your
wp-config.phpfile:
define('WU_HOSTINGER_API_TOKEN', 'your_hostinger_api_token');
define('WU_HOSTINGER_ACCOUNT_ID', 'your_hostinger_account_id');
Optionally, you can also define:
define('WU_HOSTINGER_API_URL', 'https://api.hostinger.com/v1'); // Default API endpoint
Setup Instructions
1. Generate Your Hostinger API Token
- Log in to your Hostinger account and access hPanel
- Navigate to Account Settings → API Tokens
- Click Create New Token
- Give your token a descriptive name (e.g., "Ultimate Multisite")
- Select the necessary permissions:
- Domain management
- Subdomain management
- Copy the generated token and store it securely
2. Find Your Account ID
- In hPanel, go to Account Settings → Account Information
- Your Account ID is displayed on this page
- Copy and save this ID for the next step
3. Add Constants to wp-config.php
Add the following constants to your wp-config.php file:
define('WU_HOSTINGER_API_TOKEN', 'your_hostinger_api_token');
define('WU_HOSTINGER_ACCOUNT_ID', 'your_hostinger_account_id');
If your Hostinger account uses a different API endpoint, you can customize it:
define('WU_HOSTINGER_API_URL', 'https://api.hostinger.com/v1');
4. Enable the Integration
- In your WordPress admin, go to Ultimate Multisite > Settings
- Navigate to the Domain Mapping tab
- Scroll down to Host Integrations
- Enable the Hostinger (hPanel) integration
- Click Save Changes
How It Works
Addon Domains
When you map a domain in Ultimate Multisite:
- The integration sends a request to Hostinger's API to add the domain as an addon domain
- The domain is configured to point to your root directory
- When a domain mapping is removed, the integration automatically removes the addon domain from hPanel