WP Toolkit Custom Events
Last modified: 2026 February 12
Overview
WP Toolkit can run custom scripts after it completes specific actions. This allows you to automate tasks for WordPress instances.
Enable event hooks
To use hooks for custom events, enable the feature in the WP Toolkit configuration file. Add the following option to the /usr/local/cpanel/3rdparty/wp-toolkit/var/etc/config.ini file:
exposeEventsFeature = trueThe usr/local/cpanel/3rdparty/wp-toolkit/var/user-hooks directory contains the custom scripts WP Toolkit runs after supported actions.
Use the correct filename for the action that you want to automate. You can only run one script per action.
Supported actions and their hooks
If present in the usr/local/cpanel/3rdparty/wp-toolkit/var/user-hooks directory, WP Toolkit runs the following scripts after it completes the corresponding action.
| Action | Description |
|---|---|
| Site installation completed | The ./site-installation-completed script runs after WP Toolkit installs and configures a WordPress site.Arguments:
|
| Plugin installation completed | The ./plugin-installation-completed script runs after WP Toolkit installs a plugin (including plugins installed via sets).Arguments:
|
| Theme installation completed | The ./theme-installation-completed script runs after WP Toolkit installs a theme (including themes installed via sets).Arguments:
|
| Set installation completed | The ./set-installation-completed script runs after WP Toolkit installs a set.Arguments:
|
| Vulnerability check completed | The ./vulnerability-check-completed script runs after WP Toolkit finishes scanning for vulnerabilities.Arguments:
|
| Site cloning completed | The ./site-cloning-completed script runs after WP Toolkit completes site cloning.Arguments:
|
| Site syncing completed | The ./site-syncing-completed script runs after WP Toolkit finishes copying data between sites.Arguments:
--target-site-path=/absolute/path/to/wordpress |
| WordPress core updated | The ./site-core-updated script runs after WP Toolkit updates WordPress core.Arguments:
|
| Plugin update completed | The ./site-plugin-updated script runs after WP Toolkit updates a plugin.Arguments:
|
| Theme update completed | The ./site-theme-updated script runs after WP Toolkit updates a theme.Arguments:
|