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

ActiveLibrary[API Development](/categories/api)

plesk/api-php-lib
=================

PHP object-oriented library for Plesk XML-RPC API

v2.2.1(1y ago)156229.0k↓15.6%79[8 issues](https://github.com/plesk/api-php-lib/issues)[1 PRs](https://github.com/plesk/api-php-lib/pulls)7Apache-2.0PHPPHP ^7.4 || ^8.0CI passing

Since Jun 13Pushed 3mo ago45 watchersCompare

[ Source](https://github.com/plesk/api-php-lib)[ Packagist](https://packagist.org/packages/plesk/api-php-lib)[ RSS](/packages/plesk-api-php-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (21)Used By (7)

PHP library for Plesk XML-RPC API
---------------------------------

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

[![Test Status](https://github.com/plesk/api-php-lib/actions/workflows/test.yml/badge.svg)](https://github.com/plesk/api-php-lib/actions/workflows/test.yml)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/51705b0e715ea5dc0fd7db6a0cbae456d297478b51ed51e92cd19d1236a4e925/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706c65736b2f6170692d7068702d6c69622f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/plesk/api-php-lib/?branch=master)[![codecov](https://camo.githubusercontent.com/f2ca93dda9df86e719073e95057b25ff8d3e69348f02b5013d89e74c32f03e18/68747470733a2f2f636f6465636f762e696f2f67682f706c65736b2f6170692d7068702d6c69622f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d354b7762646470646562)](https://codecov.io/gh/plesk/api-php-lib)

PHP object-oriented library for Plesk XML-RPC API.

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

[](#install-via-composer)

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

`composer require plesk/api-php-lib`

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->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 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 composer test`

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 composer test`

One more way to run tests is to use Docker:

`docker-compose run tests`

Continuous Testing
------------------

[](#continuous-testing)

During active development it could be more convenient to run tests in continuous manner. Here is the way how to achieve it:

`REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password composer test:watch`

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance65

Regular maintenance activity

Popularity54

Moderate usage in the ecosystem

Community43

Growing community involvement

Maturity77

Established project with proven stability

 Bus Factor1

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

Every ~130 days

Recently: every ~157 days

Total

20

Last Release

410d ago

Major Versions

v1.1.2 → v2.0.02022-03-29

v1.1.3 → v2.1.02023-07-14

PHP version history (8 changes)v1.0.0PHP ^5.6|^7.1

v1.0.1PHP ^5.6|^7.1|^7.0

v1.0.2PHP ^5.6 | ^7.0

v1.0.3PHP ^5.6 || ^7.0

v1.0.7PHP ^7.3

v1.0.8PHP ^7.3 || ^8.0

1.1.1PHP ^7.4 || ^8.0

v2.1.0PHP ^7.4 || ^8.0 || ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/672db89ae3cb050ec28a9c994b762501c7d709402503a9d83261a5caea856614?d=identicon)[rybalov](/maintainers/rybalov)

![](https://www.gravatar.com/avatar/2ca15abc89b20360e27e34a643611b8d3d47d4ca637e992a21d9347675688578?d=identicon)[laurisb](/maintainers/laurisb)

![](https://avatars.githubusercontent.com/u/187856?v=4)[Alexey Yuzhakov](/maintainers/sibprogrammer)[@sibprogrammer](https://github.com/sibprogrammer)

![](https://www.gravatar.com/avatar/5928ecaf5890c963894d11983fbbf88b64ac619c641efa30d5e1140070f4ec54?d=identicon)[xgin](/maintainers/xgin)

![](https://www.gravatar.com/avatar/0b6058337988e00e2354b712eeebd14c0d2c7b8e976daf91e04b8dcfd0f2a6e3?d=identicon)[mrsombre](/maintainers/mrsombre)

![](https://www.gravatar.com/avatar/5a75907818cb549188e1d3745c86a58cb43e72816ad688ca8491f3cd967d41cc?d=identicon)[espitsyna](/maintainers/espitsyna)

---

Top Contributors

[![sibprogrammer](https://avatars.githubusercontent.com/u/187856?v=4)](https://github.com/sibprogrammer "sibprogrammer (304 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (46 commits)")[![mrsombre](https://avatars.githubusercontent.com/u/376535?v=4)](https://github.com/mrsombre "mrsombre (15 commits)")[![xgin](https://avatars.githubusercontent.com/u/5378093?v=4)](https://github.com/xgin "xgin (13 commits)")[![rybalov](https://avatars.githubusercontent.com/u/9481760?v=4)](https://github.com/rybalov "rybalov (4 commits)")[![simonsolutions](https://avatars.githubusercontent.com/u/20499623?v=4)](https://github.com/simonsolutions "simonsolutions (4 commits)")[![vbaranovskiy-plesk](https://avatars.githubusercontent.com/u/19778578?v=4)](https://github.com/vbaranovskiy-plesk "vbaranovskiy-plesk (4 commits)")[![laurisb](https://avatars.githubusercontent.com/u/2082155?v=4)](https://github.com/laurisb "laurisb (2 commits)")[![AlekseiFedorov-Plesk](https://avatars.githubusercontent.com/u/107476336?v=4)](https://github.com/AlekseiFedorov-Plesk "AlekseiFedorov-Plesk (2 commits)")[![abashurov](https://avatars.githubusercontent.com/u/45628798?v=4)](https://github.com/abashurov "abashurov (2 commits)")[![sergei-milke](https://avatars.githubusercontent.com/u/24819987?v=4)](https://github.com/sergei-milke "sergei-milke (1 commits)")[![ayvazyan10](https://avatars.githubusercontent.com/u/79054971?v=4)](https://github.com/ayvazyan10 "ayvazyan10 (1 commits)")[![whytea91](https://avatars.githubusercontent.com/u/127747189?v=4)](https://github.com/whytea91 "whytea91 (1 commits)")[![sofiiakulish](https://avatars.githubusercontent.com/u/51999409?v=4)](https://github.com/sofiiakulish "sofiiakulish (1 commits)")[![transkontrol](https://avatars.githubusercontent.com/u/20657481?v=4)](https://github.com/transkontrol "transkontrol (1 commits)")[![vizovitin](https://avatars.githubusercontent.com/u/73231049?v=4)](https://github.com/vizovitin "vizovitin (1 commits)")[![vlikhtanskiy](https://avatars.githubusercontent.com/u/13726356?v=4)](https://github.com/vlikhtanskiy "vlikhtanskiy (1 commits)")[![DavidHDJ](https://avatars.githubusercontent.com/u/50745202?v=4)](https://github.com/DavidHDJ "DavidHDJ (1 commits)")[![jb-boin](https://avatars.githubusercontent.com/u/4568403?v=4)](https://github.com/jb-boin "jb-boin (1 commits)")[![ghermans](https://avatars.githubusercontent.com/u/1594411?v=4)](https://github.com/ghermans "ghermans (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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