mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 12:36:23 -07:00
Use wp-cli from git repo if available
This commit is contained in:
parent
c8f9601a35
commit
b13b25602c
1 changed files with 7 additions and 1 deletions
|
@ -58,6 +58,12 @@ if ! command -v wp &> /dev/null; then
|
|||
echo "WP CLI installed successfully."
|
||||
fi
|
||||
|
||||
wpcli="/usr/local/bin/wp"
|
||||
|
||||
if [ -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
|
||||
wpcli="/usr/local/bin/wp-cli/php/boot-fs.php"
|
||||
fi
|
||||
|
||||
if [ ! -d "/home/$user/web/$domain/public_html" ]; then
|
||||
# echo "Domain doesn't exist";
|
||||
exit 1;
|
||||
|
@ -73,7 +79,7 @@ phpver=$(/usr/local/vesta/bin/v-get-php-version-of-domain "$domain")
|
|||
#----------------------------------------------------------#
|
||||
|
||||
cd /home/$USER/web/$domain/public_html
|
||||
sudo -u $USER /usr/bin/php$phpver -d disable_functions=pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,exec,system,passthru,shell_exec,proc_open,popen -d open_basedir=/home/$user/web/$domain:/home/$user/.wp-cli:/home/$user/tmp:/usr/local/bin /usr/local/bin/wp --path=/home/$user/web/$domain/public_html/ $wp_command 2>/home/$user/web/$domain/wp-cli-error.log
|
||||
sudo -u $USER /usr/bin/php$phpver -d disable_functions=pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,exec,system,passthru,shell_exec,proc_open,popen -d open_basedir=/home/$user/web/$domain:/home/$user/.wp-cli:/home/$user/tmp:/usr/local/bin $wpcli --path=/home/$user/web/$domain/public_html/ $wp_command 2>/home/$user/web/$domain/wp-cli-error.log
|
||||
|
||||
# echo "WP CLI: Done."
|
||||
# echo "To see Warning/Error log: "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue