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