Install WordPress after account creation?

PhilipUK

Registered
Aug 18, 2010
4
1
53
Hi,
I wonder if anyone could point me in the right direction, please?

I'd like to have WHM automatically install WordPress (using WordPress manager) immediately after creating a new account. Is this possible, and if so - how might I go about it?

Thanks in advance,
Phil. :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello Phil,

You'd need to develop a custom script that makes use of the following cPanel API 1 function to install WordPress:

cPanel API 1 Functions - cPAddons::mainpg - Developer Documentation - cPanel Documentation

You can then setup a post-stage hook that runs your custom script immediately after an account is created. You can read more about how hooks work at:

Tutorial - Create a Standardized Hook - Software Development Kit - cPanel Documentation

The particular event you would hook into is Accounts::Create:

Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation

Thank you.