Skip to main content

Help with automatic install WordPress on new accounts using BASH

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! It might be best to tag @chengkinhung to see if he has any ideas on this, as we aren't able to support custom scripts. If you're seeing any issues with the steps outlined in the support page I'd be happy to do some additional research on that for you.
    0
  • Alnaggar
    @cPRex Thank you for your reply, I have checked his profile (Last seen: Aug 26, 2020) I don't think he will reply any soon, I posted it here maybe someone with experience can help out. If you don't mind could you please try the script and tell me if it's does the same with you? Maybe I didn't configure things in cPanel right or maybe I didn't install WP CLi the right way? I'm new to cPanel and will appreciate any help.
    0
  • cPRex Jurassic Moderator
    We aren't able to perform troubleshooting on custom scripts on our end. If you get a specific error I would be able to tell you if that's related to cPanel tools. If you're having issues with the WP CLI tool you could always open a ticket with our team so we can check that directly on the system and confirm that is set up correctly.
    0
  • Alnaggar
    @cPRex I opened a support ticket and will wait for their reply, In the mean I have tried to check what might be the issue and I think it's this directory not in my sever (/opt/cpanel/ea-php72/root/usr/bin/php) what is this directory for ? and how can I locate the right one in my server? when I try "cd /opt/cpanel/ea-php72/root/usr/bin/php" it show me error "Not a directory"
    0
  • cPRex Jurassic Moderator
    That path would be specific to PHP 7.2, but they would all have a similar location of /opt/cpanel/ea-php## that corresponds to the version of PHP you are using.
    0
  • Alnaggar
    I have found the problem and it was my bad, The script is perfect and many thanks to @chengkinhung for sharing it with public you really a great man, First I didn't match the data correctly in the /root/tmp/wp_src/wp-config.php So they can be replaced with new created value : MYWPDB_DATABASE MYWPDB_USERNAME MYWPDB_PASSWORD MYWPDB_HOSTNAME
    Second, I didn't give the right permission to the script after I edited it: chmod 0755 /usr/local/cpanel/3rdparty/bin/wpAutoInstall.sh chown root:root /usr/local/cpanel/3rdparty/bin/wpAutoInstall.sh /usr/local/cpanel/bin/manage_hooks add script /usr/local/cpanel/3rdparty/bin/wpAutoInstall.sh --manual --category Whostmgr --event Accounts::Create --stage=post
    Again many thanks to @chengkinhung for this amazing script.
    0

Please sign in to leave a comment.