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,

    David


  • administrators
    | 118581 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:

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

    WordPress=https://wordpress.org/latest.tar.gz --usercmd=mybatchfile.bat

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

    WordPress=https://wordpress.org/latest.tar.gz --usercmd=mybatchfile.bat %d

    And then run the batch file after the site creation.

    Two:
    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?

    Thanks,

    David


Log in to reply
 

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