WP Toolkit Custom Events

WP Toolkit supports custom event hooks that allow administrators to run scripts automatically after specific WordPress‑related actions occur. This feature enables automation for deployments, monitoring, integrations, security workflows, and post‑processing tasks. By enabling event hooks and placing scripts in the correct directory with the correct filenames, WP Toolkit will execute them immediately after the corresponding action completes.

WP Toolkit eventsWordPress automationWP Toolkit hooks

~2 min read · Updated Feb 15, 2026

WP Toolkit Custom Events


Last modified: February 12, 2026


Overview

WP Toolkit can run custom scripts after completing specific actions. This feature allows administrators to automate tasks for WordPress instances, such as logging, monitoring, deployments, notifications, or integrations with external systems.


Enable Event Hooks

To enable custom event hooks, add the following option to the WP Toolkit configuration file:


/usr/local/cpanel/3rdparty/wp-toolkit/var/etc/config.ini

Add this line:


exposeEventsFeature = true

Custom scripts must be placed in the following directory:


/usr/local/cpanel/3rdparty/wp-toolkit/var/user-hooks

Important:

  • Use the correct filename for the action you want to automate.
  • Only one script can be used per action.
  • Scripts must be executable.



Supported Actions and Their Hooks

If a script with the correct filename exists in the user-hooks directory, WP Toolkit will run it after the corresponding action completes.


ActionDescriptionArguments
Site installation completed Runs after WP Toolkit installs and configures a WordPress site. --instance-id=1
/absolute/path/to/wordpress
Plugin installation completed Runs after WP Toolkit installs a plugin (including plugins installed via sets). --instance-id=1
--plugin-slug=slug
/absolute/path/to/wordpress
Theme installation completed Runs after WP Toolkit installs a theme (including themes installed via sets). --instance-id=1
--theme-slug=slug
/absolute/path/to/wordpress
Set installation completed Runs after WP Toolkit installs a set. --instance-id=1
--set-id=1
/absolute/path/to/wordpress
Vulnerability check completed Runs after WP Toolkit finishes scanning for vulnerabilities. --instance-id=1
--old-vulnerabilities=1,2
--new-vulnerabilities=3,4
/absolute/path/to/wordpress
Site cloning completed Runs after WP Toolkit completes site cloning. --source-instance-id=1
--source-site-path=/absolute/path/to/wordpress
--target-instance-id=2
--target-site-path=/absolute/path/to/wordpress
Site syncing completed Runs after WP Toolkit finishes copying data between sites. --source-instance-id=1
--source-site-path=/absolute/path/to/wordpress
--target-instance-id=2
--target-site-path=/absolute/path/to/wordpress
WordPress core updated Runs after WP Toolkit updates the WordPress core. --instance-id=1
--old-version=1
--new-version=2
--site-path=/absolute/path/to/wordpress
Plugin update completed Runs after WP Toolkit updates a plugin. --instance-id=1
--slug=plugin-slug
--old-version=1
--new-version=2
--site-path=/absolute/path/to/wordpress
Theme update completed Runs after WP Toolkit updates a theme. --instance-id=1
--slug=theme-slug
--old-version=1
--new-version=2
--site-path=/absolute/path/to/wordpress

Conclusion

WP Toolkit Custom Events provide a powerful automation layer for WordPress management. By enabling event hooks and placing scripts in the correct directory, administrators can automate workflows such as deployments, monitoring, updates, and security tasks with ease.


Written & researched by Dr. Shahin Siami

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue