PHPackages                             alaa-hany/awhm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alaa-hany/awhm

ActiveLibrary[API Development](/categories/api)

alaa-hany/awhm
==============

WHM &amp; Cpanel API with PHP

v1.0.0(4y ago)117MITPHP

Since Apr 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/alaa-hany-elsaid/awhm)[ Packagist](https://packagist.org/packages/alaa-hany/awhm)[ RSS](/packages/alaa-hany-awhm/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

AWHM
====

[](#awhm)

Execute WHM and Cpanel operation with API by PHP

Installation
------------

[](#installation)

Install the latest version with:

```
$ composer require  alaa-hany/awhm
```

Requirements
------------

[](#requirements)

- PHP 7.0 or higher is required

Supported Operations for Now
----------------------------

[](#supported-operations-for-now)

- WHM
    - Accounts
        - Get all Cpanel account
        - Create new Cpanel user
        - Delete Cpanel user
        - Get suspensions Cpanel users
        - Suspend Cpanel user
        - Unsuspend Cpanel user
    - Services
        - Restart service
        - Enable service
        - Disable service
        - Get service Status
        - Get service configuration
    - Mail
        - Get email accounts of Cpanel user
- Cpanel
    - there is not supported operation for now

Basic usage
-----------

[](#basic-usage)

```
// All API Calls made throw HTTPS
use \Alaa\Awhm\base\WHMClient ;
$ipOrDomain = "YOUR_IP_OR_DOMAIN"; // IP is preferred , we take care of get Domain
$user  = 'root' ; //  for example
$token = "YOUR_TOKEN" ; //
$whmClient = new WHMClient($ipOrDomain , $user , $token);

//--------- Accounts ---------//

// get All Cpanel users
var_dump($whmClient->accountsManagementInstance()->all());

// Create Cpanel users
$diskSizeInMegaBytes = 500; // Default unlimited
var_dump ($whmClient->accountsManagementInstance()->create("USER_NAME" , "PASSWORD" , $diskSizeInMegaBytes));

// get All suspended Cpanel users
var_dump ($whmClient->accountsManagementInstance()->suspensions());

// suspend Cpanel user
var_dump ($whmClient->accountsManagementInstance()->suspendCpanelUser("CPANEL_USER_NAME"));

// suspend Cpanel users
var_dump ($whmClient->accountsManagementInstance()->unsuspendCpanelUser("CPANEL_USER_NAME"));

// delete Cpanel users
var_dump ($whmClient->accountsManagementInstance()->delete("CPANEL_USER_NAME"));

//----------- Services -----------//

/**
*  \Alaa\Awhm\whm\services\Services class contain some service name , You can use it or pass service's Name
 */

// restart service
var_dump ($whmClient->servicesManagementInstance()->restartService(\Alaa\Awhm\whm\services\Services::HTTP));

// Disable Service
var_dump ($whmClient->servicesManagementInstance()->disableService(\Alaa\Awhm\whm\services\Services::FTP));

// Enable Service
var_dump ($whmClient->servicesManagementInstance()->enableService(\Alaa\Awhm\whm\services\Services::FTP));

// Get Service Config
var_dump ($whmClient->servicesManagementInstance()->getServiceConfig(\Alaa\Awhm\whm\services\Services::FTP));

// Get Service Status
var_dump ($whmClient->servicesManagementInstance()->getServiceStatus(\Alaa\Awhm\whm\services\Services::FTP));

//------- Mail --------//

// Get email accounts of Cpanel user
var_dump ($whmClient->mailManagementInstance()->getEmailAccountsOfCpanelUser("CPANEL_USER_NAME"));
```

Note
----

[](#note)

If you need any non exists operation , you are welcome to order it .
Contact me on :
 Email :
 whatsapp : [+201063745208](https://wa.me/201063745208)

License
-------

[](#license)

alaa-hany/awhm is licensed under the MIT License.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1553d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d553b830653f90ed7e6040c184d3ca29dc4a587c40f153a10dae608228f749e?d=identicon)[Alaa-Hany](/maintainers/Alaa-Hany)

---

Top Contributors

[![alaa-hany-elsaid](https://avatars.githubusercontent.com/u/62419181?v=4)](https://github.com/alaa-hany-elsaid "alaa-hany-elsaid (6 commits)")

---

Tags

apicpanelcpanel-apilaravelphpwhmwhm-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alaa-hany-awhm/health.svg)

```
[![Health](https://phpackages.com/badges/alaa-hany-awhm/health.svg)](https://phpackages.com/packages/alaa-hany-awhm)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M984](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
