Introduction

About Plesk Extensions

A Plesk extension, as the name suggests, is a third-party software that adds new functionality to Plesk. The former name of Plesk extensions is modules. Typical examples of extensions are help desk and ticket system solutions. On one hand, these solutions access information about Plesk entities, particularly, user accounts, and on the other hand they provide their own tools to help administrators and customers communicate with each other.

Extensions are written in PHP and their organization reuses Zend framework practices to a large extent, for example, the implementation of MVC and forms construction. Using these practices is recommended, but is not required. Because PHP is mandatory for writing extensions, we assume that the readers of this document have knowledge of the programming language. If you haven't written PHP applications before, you can still use the document, but you might need to read some PHP-specific topics (which are beyond the document scope) to develop the extension you need.

How to Create and Install Extensions

A ready for distribution extension is a ZIP archive which contains a specifically-organized directory structure and a file with meta information describing the software. A fast way to create an extension is to call the extension command-line utility (extension --create <EXTENSION_NAME>). This call will create the necessary file structure. Read more about organization of extension files in Extension Structure.

Extensions are normally installed by the administrator in Plesk, in Server Management > Extensions (in the left navigation menu).

Extensions Management Utility

The extension command-line utility enables you to manage extensions through the command-line interface, including installation or removing of extensions, packing the source files of an extension into a ZIP archive ready for distribution, and generating an extension template. Learn how to use the extensions utility.

Get Started with Extensions Development

The most rapid way to start developing extensions is to read the Quick Start chapter. This chapter guides you through the process of developing simple extensions and provides concrete examples of using Plesk features in combination with conceptual information and best practices of how to work with the SDK.

Extension Examples

We provide examples of implementation of certain extensions, such as RSS news or requests tracking system. You can learn from the examples and use their code when developing custom extensions for Plesk. Learn more.

API Stubs

For quicker development, you can use API stubs for IDE, which are available at https://github.com/plesk/pm-api-stubs. Download the files and add them to your IDE. For example, if you use PhpStorm, go to Project Settings > PHP and add the directory with the downloaded files in Include Path.

Plesk Features Available to Extensions

An extension can receive information about Plesk entities, react to different system events, and do even more through Plesk interfaces. The full list of available interfaces is as follows:

Testing Extensions

In order to test an extension, you should install it to Plesk. To provide you with more debugging information, we recommend that you increase the verbosity of the debugging information in Plesk. Learn how to test extensions.

Resources and Further Learning

This document covers only the basic functionality that the SDK provides. To view a complete list of Plesk tools that an extension can use, read the auto-generated Reference document and review the extension samples.

Additionally, for learning purposes, you can use existing Plesk extensions available on our GitHub page. See also the Extension Examples section of this guide.