Struggling with getting WP CLI working in cPanel account path
Good Morning,
Goal
To run cron jobs for a CiviCRM install that is in a sub directory below public_html.
Instructions Followed
https://cpanel.net/blog/tips-and-tricks/wp-cli-install-and-manage-wordpress-on-the-command-line/
https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#wp-cli
How I have interpreted the cPanel Instructions
1. From /home/mycpanelaccount/public_html/members I have run curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
2. I have then run, from the same location, echo "alias wp='~/wp-cli.phar'" >> .bashrc
(should I have included the /members bit there??)
my cron job within cPanel:
/home/mycpaneluseraccount/public_html/members/wp-cli.phar --user=redacteduniqueadminwpuser --url=https://mywebsite.uk/members --path=/home/mycpaneluseraccount/public_html/members civicrm api job.execute auth=0 > /dev/null 2>&1
Anything obvious that I have done wrong or missed please? I'm pulling my hair out!
Thanks :)
-
Hey there! The first thing to check would be to see if the command is working as that user outside of the cron. When logged into shell as your cPanel user, are you able to enter the "wp" command and get output showing the options available?
0 -
@... - I'm not sure I understand - what issues are you seeing with your testing?
0 -
Replying for the updates.
0
Please sign in to leave a comment.
Comments
3 comments