PHPackages                             proficlos/vestacp-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. proficlos/vestacp-api

ActiveLibrary[API Development](/categories/api)

proficlos/vestacp-api
=====================

VestaCP PHP API

v1.0.0(6y ago)2731MITPHPPHP &gt;=7.1CI failing

Since Feb 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ProfiCloS/vestacp-api)[ Packagist](https://packagist.org/packages/proficlos/vestacp-api)[ Docs](https://github.com/ProfiCloS/vestacp-api)[ RSS](/packages/proficlos-vestacp-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

[![GitHub version](https://camo.githubusercontent.com/e93e6597a59d148c2b390bdfaa4d77992c4685ed130410eecef69beabde3d5bf/68747470733a2f2f62616467652e667572792e696f2f67682f50726f6669436c6f53253246766573746163702d6170692e737667)](https://badge.fury.io/gh/ProfiCloS%2Fvestacp-api)[![Build Status](https://camo.githubusercontent.com/addee2183d758f677345bc52cb77419ce443890ca8c2333c03bcb4add2cea371/68747470733a2f2f7472617669732d63692e636f6d2f50726f6669436c6f532f766573746163702d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ProfiCloS/vestacp-api)[![codecov](https://camo.githubusercontent.com/0a8810ed2997eadfbda85ff23141fcb746d95f5de959115281ddd440e997b7a9/68747470733a2f2f636f6465636f762e696f2f67682f50726f6669436c6f532f766573746163702d6170692f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/ProfiCloS/vestacp-api)

VestaCP PHP API
===============

[](#vestacp-php-api)

How to use
----------

[](#how-to-use)

1. Installation

    ```
    $ composer require proficlos/vestacp-api
    ```
2. Create Client

    a) Easy way

    ```
    use ProfiCloS\VestaCP\Client;

    // easy way to create Client
    $client = Client::simpleFactory('https://someHost', 'someUser', 'somePass');
    ```

    b) For some reasons (more hosts, etc) you may need create objects alone

    ```
    use ProfiCloS\VestaCP\Client;
    use ProfiCloS\VestaCP\Authorization\Credentials;
    use ProfiCloS\VestaCP\Authorization\Host;

    $credentials = new Credentials('someUser', 'somePassword');
    $host = new Host('https://someHost', $credentials);
    $client = new Client($host);
    ```
3. Usage

    ```
    // verify login
    $client->testAuthorization(); // bool
    ```

    You can simply send one of prepared commands (or you can write own command - must implements `\ProfiCloS\VestaCP\Command\ICommand` )

    ```
    $command = new SomeCommand();
    $response = $client->send( $command );

    echo $response->getResponseText();
    ```

    Or you can use prepared modules

    a) user module

    ```
    $userModule = $client->getModuleUser();

    $userModule->list(); // returns all users with data
    $userModule->detail('admin'); // returns selected user with data
    $userModule->changePassword('admin', 'otherPa$$word');
    $userModule->add('other_user', 'pa$$word', 'some@email.com');
    $userModule->delete('other_user');
    // ... etc
    ```

    b) web module

    ```
    $webModule = $client->getModuleWeb('admin'); // web module needs user

    $webModule->listDomains();
    $webModule->addDomain('domain.com');
    $webModule->addDomainLetsEncrypt('domain.com', 'www.domain.com'); // needs longer timeout
    $webModule->deleteDomainLetsEncrypt('domain.com');
    $webModule->addDomainFtp('domain.com', 'test', 'pa$$word');
    $webModule->changeDomainFtpPassword('domain.com', 'admin_test', 'otherPa$$word');
    $webModule->changeDomainFtpPath('domain.com', 'admin_test', 'path/other');
    $webModule->deleteDomainFtp('domain.com', 'admin_test');
    $webModule->deleteDomain('domain.com');
    // ... etc
    ```

    c) mail module

    ```
    $mailModule = $client->getModuleMail('admin'); // mail module needs user

    $mailModule->listDomains(); // returns mail domains from selected user
    $mailModule->addDomain('domain.com'); // add domain
    $mailModule->listAccounts('domain.com'); // returns accounts from selected user and domain
    $mailModule->listDomainDkim('domain.com');
    $mailModule->listDomainDkimDns('domain.com');
    $mailModule->addAccount('domain.com', 'info', 'pa$$word'); // add info@domain.com account
    $mailModule->changeAccountPassword('domain.com', 'info', 'otherPa$$word'); // change info@domain.com password
    $mailModule->deleteAccount('domain.com', 'info');
    $mailModule->deleteDomain('domain.com');
    // ... etc
    ```

    d) db module

    ```
    // modules
    $dbModule = $client->getModuleDb();

    // todo
    // ... etc
    ```

    e) cron module

    ```
    $cronModule = $client->getModuleCron();

    // todo
    // ... etc
    ```

    f) backup module

    ```
    $backupModule = $client->getModuleBackup();

    // todo
    // ... etc
    ```

Buy us a coffee &lt;3
---------------------

[](#buy-us-a-coffee-3)

[![Buy me a Coffee](https://camo.githubusercontent.com/648ad6f048733f167bf65e11a4fd759eef14da88db61ad078bbd5ddea5d57133/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e6174655f4c472e676966)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E8NK53NGKVDHS)

Donate us &lt;3
---------------

[](#donate-us-3)

```
ETH: 0x7D771A56735500f76af15F589155BDC91613D4aB
UBIQ: 0xAC08C7B9F06EFb42a603d7222c359e0fF54e0a13

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

Every ~129 days

Total

3

Last Release

2374d ago

Major Versions

v0.2 → v1.0.02019-11-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7625df7e2a7dd56391301ee892c1d3993da57d24595e3e9706d60da4ae3322e?d=identicon)[ProfiCloS](/maintainers/ProfiCloS)

---

Top Contributors

[![czPechy](https://avatars.githubusercontent.com/u/8396185?v=4)](https://github.com/czPechy "czPechy (34 commits)")

---

Tags

apiapi-clientphpphp-libraryphp7vestavestacp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/proficlos-vestacp-api/health.svg)

```
[![Health](https://phpackages.com/badges/proficlos-vestacp-api/health.svg)](https://phpackages.com/packages/proficlos-vestacp-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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