PHPackages                             stayallive/plesk-php-api - 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. stayallive/plesk-php-api

AbandonedArchivedLibrary[API Development](/categories/api)

stayallive/plesk-php-api
========================

PHP object-oriented library for communicating with the Plesk XML-RPC API.

v0.1.0(9y ago)160Apache-2.0PHPPHP &gt;=7.0.0

Since Jan 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stayallive/plesk-php-api)[ Packagist](https://packagist.org/packages/stayallive/plesk-php-api)[ RSS](/packages/stayallive-plesk-php-api/feed)WikiDiscussions develop Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

PHP library for communicating with the Plesk XML-RPC API
========================================================

[](#php-library-for-communicating-with-the-plesk-xml-rpc-api)

Install Via Composer
--------------------

[](#install-via-composer)

[Composer](https://getcomposer.org/) is a preferred way to install.

Run: `composer require stayallive/plesk-php-api:0.1.*` in your project.

Usage Examples
--------------

[](#usage-examples)

Here is an example on how to use the library and create a customer with desired properties:

```
$client = new \PleskX\Api\Client($host);
$client->setCredentials($login, $password);

$client->customer()->create([
    'cname'  => 'Plesk',
    'pname'  => 'John Smith',
    'login'  => 'john',
    'passwd' => 'secret',
    'email'  => 'john@smith.com',
]);
```

It is possible to use a secret key instead of password for authentication.

```
$client = new \PleskX\Api\Client($host);
-$client->setCredentials($login, $password);
+$client->setSecretKey($secretKey);
```

In case of Plesk extension creation one can use an internal mechanism to access XML-RPC API. It does not require to pass authentication because the extension works in the context of Plesk.

```
$client = new \PleskX\Api\InternalClient();
$protocols = $client->server()->getProtos();
```

For additional examples see `tests` directory.

How to Run Unit Tests
---------------------

[](#how-to-run-unit-tests)

One of the possible ways to become familiar with the library is to check the unit tests.

To run the unit tests use the following command:

```
REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password ./vendor/bin/phpunit
```

To use custom port one can provide a URL (e.g. for Docker container):

```
REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password ./vendor/bin/phpunit`
```

You can start a Docker container for testing using:

```
docker run -d -it -p 8443:8443 plesk/plesk
```

After which the container is available on `http://localhost:8443` assuming you run Docker local and you can run:

```
REMOTE_URL=https://127.0.0.1:8443 REMOTE_PASSWORD=changeme ./vendor/bin/phpunit`
```

You can also run single groups of test using the `--group` parameters, to list al available groups:

```
./vendor/bin/phpunit --list-groups
```

To run the Customer tests:

```
REMOTE_URL=https://127.0.0.1:8443 REMOTE_PASSWORD=changeme ./vendor/bin/phpunit --group customer
```

Using Grunt for Continuous Testing
----------------------------------

[](#using-grunt-for-continuous-testing)

- Install node.js and install grunt globally: `npm -g install grunt`
- Install dependencies via `npm install` or `yarn install` command
- Run `REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password grunt watch:test`

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.8% 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

3460d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1090754?v=4)[Alex Bouma](/maintainers/stayallive)[@stayallive](https://github.com/stayallive)

---

Top Contributors

[![sibprogrammer](https://avatars.githubusercontent.com/u/187856?v=4)](https://github.com/sibprogrammer "sibprogrammer (118 commits)")[![stayallive](https://avatars.githubusercontent.com/u/1090754?v=4)](https://github.com/stayallive "stayallive (53 commits)")[![ghermans](https://avatars.githubusercontent.com/u/1594411?v=4)](https://github.com/ghermans "ghermans (1 commits)")[![sergei-milke](https://avatars.githubusercontent.com/u/24819987?v=4)](https://github.com/sergei-milke "sergei-milke (1 commits)")[![vlikhtanskiy](https://avatars.githubusercontent.com/u/13726356?v=4)](https://github.com/vlikhtanskiy "vlikhtanskiy (1 commits)")

---

Tags

phpplesk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stayallive-plesk-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/stayallive-plesk-php-api/health.svg)](https://phpackages.com/packages/stayallive-plesk-php-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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