• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue WP-CLI for no root user

nekoinformatiqur

New Pleskian
Server operating system version
Debian 12
Plesk version and microupdate number
18.0.65
Hello, after install wp-cli :

root@plesk:~# wp --info
OS: Linux 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php8.2
PHP version: 8.2.26
php.ini used: /etc/php/8.2/cli/php.ini
MySQL binary: /usr/bin/mysql
MySQL version: mysql Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
SQL modes: ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /root
WP-CLI packages dir:
WP-CLI cache dir: /root/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.11.0

root@plesk:~# ./update-chroot.sh --add wp
not a dynamic executable
'/usr/local/bin/wp' -> '/var/www/vhosts/chroot/usr/local/bin/wp'
Done! Do not forget to run './update-chroot.sh --apply domains...' to apply changes in chroot template to domains.
root@plesk:~# ./update-chroot.sh --apply all
Applying chrooted environment on tamadi.org: Done! Action have been completed.
Applying chrooted environment on librairieludiquecactus.fr: Done! Action have been completed.
Applying chrooted environment on terresdecreations.fr: Done! Action have been completed.
Applying chrooted environment on ledeniche.fr: Done! Action have been completed.

SSH client error :

bash-5.2$ wp
bash: /usr/local/bin/wp: cannot execute: required file not found
bash-5.2$


Can you help me ?

Thx
 
Hello! It seems the functionality is yet to be implemented in Plesk and you could vote for it here:

You could try to add wp-cli manually using instruction from the following article:

However, it was not tested with Plesk and should be done at your own risk. I appreciate your understanding!
 
I've checked in test environment:
Code:
# file /usr/local/bin/wp
/usr/local/bin/wp: PHP phar archive with SHA1 signature

The error appear because /usr/local/bin/wp is a PHP PHAR archive, not a compiled binary. PHAR archives are self-contained PHP applications, and the "not a dynamic executable" error arises because the chroot setup script expects dynamically linked binaries, not PHP-based archives.

It's required to add PHP to the chroot environment according to instruction and then copy to the chrooted directory wp-cli phar file:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Inside chroot environment then you could execute it with PHP "php wp-cli.phar". Hope that helps!
 
Thx, it's ok for php and the file, but always problem...

Fatal error: Uncaught Error: Class "Phar" not found in /wp-cli.phar:3
Stack trace:
#0 {main}
thrown in /wp-cli.phar on line 3
 
The error means that Phar extension is not available in PHP. When PHP added to chroot extensions are not added automatically because PHP binary does not depend on them. Did you strictly follow steps from instruction? There is a step in instruction to add extensions, for exampe:
Code:
for i in $PHPPATH/lib/php/modules/*.so; do ./update-chroot.sh --add $i; done

I would recommend you add PHP to chroot by strictly following steps from instruction either for "Adding OS-provided PHP" or "Adding Plesk PHP"
 
Back
Top