GeneralDigitalPleskBundle
Symfony2 bundle for Parallels Plesk v 12 API.
GeneralDigitalPleskBundle is licensed under the MIT License - see the Resources/meta/LICENSE file for details.
Plesk API Method Supported
Create FTP UserDelete FTP UserList FTP usersCreate SubdomainDelete Subdomain
Setup
Step 1: Download GeneralDigitalPleskBundle using composer
Add GeneralDigitalPleskBundle in your composer.json:
{
"require": {
"gd/plesk-bundle": "dev-master"
}
}Now tell composer to download the bundle by running the command:
$ php composer.phar update gd/plesk-bundleStep 2: Enable the bundle
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new GeneralDigital\PleskBundle\GeneralDigitalPleskBundle(),
);
}Step 3: Add configuration
# app/config/config.yml
general_digital_plesk:
host: #plesk host
user: #plesk login user
password: #plesk passwordUsage
Using service
<?php
$plesk = $this->get('general_digital_plesk.api');Plesk API add new FTP user in a controller
<?php
$plesk = $this->get('general_digital_plesk.api');
$api->addFTPUser($ftpUsername, $ftpPassword);Using Command Line Tools
The GeneralDigitalPleskBundle provides a number of command line utilities.Commands are available for the following tasks:
- Create FTP User
- List FTP Users
- Delete FTP User
- Create subdomain
- Delete subdomain
Note:
You must have correctly installed and configured the GeneralDigitalPleskBundle before using these commands.
$ php app/console plesk:user:create testuser p@sswordSud12#