Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Subscribe to Plesk Events

 
extensions guideplesk features available for extensionsaction logdnsevents

The event handlers interface lets you subscribe to a particular Plesk
event and trigger a particular action depending on the event
information. For example, if you need to create a DNS zone each time a
new domain is created, use event handlers.

For triggering simple actions, such as logging information about Plesk
events, we recommend that you use the event tracking mechanism available
in the Plesk UI. To learn how to use this mechanism, refer to the
Administrator’s Guide, section Event
Tracking
.

For complicated actions, Plesk provides another, more flexible,
mechanism of event tracking. This mechanism allows running PHP scripts
upon Plesk events. In this section, we will explain in detail how to use
it.

How to Create a Handler

Event handlers examine the Plesk action log and invoke the
handleEvent method each time an action is added to the
log. Thus, event handler cannot prevent the action. If an attempt to
perform the action fails, Plesk does not issue notifications through
this mechanism.

Event handlers for the same event can be triggered in an arbitrary
order.

To add an event handler, create a .php file in the following
directory:

  • On Linux: /usr/local/psa/admin/plib/registry/EventListener

  • On Windows: <plesk_dir> adminplibregistryEventListener

    Where <plesk_dir> stands for the full path to the directory where
    Plesk is installed.

This file must contain a class which implements the
handleEvent method of the EventListener interface.
The code must create an instance of this class and return it. For
example:

<?php
class TestEventListener implements EventListener
{
    public function handleEvent($objectType, $objectId, $action, $oldValues, $newValues<span class="…
Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

DNS_PROBE_FINISHED_NXDOMAIN: What Is It And How To Fix The Problem

Read More »

Looking Back at APAC Partner Day 2022

Read More »

Workshops and Networking for Plesk Team at CodeFest 11

Read More »
Knowledge Base

(Plesk for Linux) System Updates

Read More »

Upgrading Plesk for Linux in Unattended Mode

Read More »

Tracing Failed Requests (Windows)

Read More »

DKIM, SPF, and DMARC Protection – SPF and SRS

Read More »

Hosting Wiki

  • DBMS Interface
  • Linux Containers
  • PhpMyAdmin
  • phpPgAdmin
  • Windows Server
  • Linux
  • PHP
  • Plesk
  • Static DNS
  • DNS Server
  • DNS Forwarding
  • Reverse DNS
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family