Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Install WordPress after account creation?

Discussion in 'cPanel Developers' started by PhilipUK, May 30, 2018.

  1. PhilipUK

    PhilipUK Registered

    Joined:
    Aug 18, 2010
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    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. :)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,740
    Likes Received:
    1,796
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice