How to run wp-cli script automatically after WP Quick app install?

  • | 1683 points

    Hi leokhoa or other Laragon users,

    How can I kick off a wp-cli script automatically after a new WP install? Is it as simple as appending the command in the WordPress line in the sites.conf file?

    Thank you,


  • administrators
    | 123538 points

    Hi @dmccan,
    Laragon doesn't support that for now. Have you got any suggestion on implementing it?

  • | 1683 points

    Hi @leokhoa,

    Thank you for considering the possibility. Here are two ideas:

    I'm not sure how the sites.conf file works, but perhaps allow a switch at the end of the line? Something like:

    WordPress= --usercmd=mybatchfile.bat

    It might be needed to pass in the directory where the site was just created.

    WordPress= --usercmd=mybatchfile.bat %d

    And then run the batch file after the site creation.

    A nice thing about the Quick app process is that the database, SSL cert, hosts file, etc are all completed automatically. Perhaps it would be possible (or already is possible) to call the Quick app create from a batch file where we could first call the Quick app create and then call the wp-cli batch file?



Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.