• 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!
  • 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.

Resolved Update WP CLI version on Plesk ext wp-toolkit --wp-cli to work with LSCache

Alnaggar

New Pleskian
Hello, I'm trying to use LSCache plugin with their wp cli commands but I get this error in every command (example):

Code:
plesk ext wp-toolkit --wp-cli -instance-id 2 -- litespeed-option all
"Error: 'litespeed-option' is not a registered wp command. See 'wp help' for available commands."

LSCache WP CLI commands

I think it's because the WP CLI version it's not updated it's currently v 2.4.0 and the latest version is 2.5.0, I tried to update it with the command:
Code:
plesk ext wp-toolkit --wp-cli -instance-id 2 -- cli update
and it gave me this error:
"Error: You can only self-update Phar files."

I'm managing a lot of sites and all of them using LSCache plugin and I really need to be able to manage the plugin setting with WP CLI commands LSCache WP CLI commands.
Is it a version issue or do I need to do anything else to make LSCache wp cli commands work?
 
Try to add --skip-plugins=false at the end of your command:

# plesk ext wp-toolkit --wp-cli -instance-id 2 -- litespeed-option all --skip-plugins=false

I hope it will help.
 
Try to add --skip-plugins=false at the end of your command:

# plesk ext wp-toolkit --wp-cli -instance-id 2 -- litespeed-option all --skip-plugins=false

I hope it will help.

From the bottom of my heart, thank you so much. It works perfectly.

Is it possible to make "--skip-plugins=false" the default when running wp cli commands, without needing to append it to each command?

Another thing is how can I update the WP-CLI to v2.5.0 manually? It has many improvements, I think WP Toolkit should update it automatically as WP CLi is so important when you dealing with a lot of sites or with automation scripts like in my case.
 
how can I update the WP-CLI to v2.5.0 manually
You can install and run the official WP-CLI from the document root directory of your WordPress instance. Do the following:

1) Go to the document root of your WP instance:
Code:
# cd /var/www/vhosts/example.com/httpdocs

2) Download wp-cli from the official site and check that it is working:
Code:
# curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# php wp-cli.phar --info

3) Make the wp-cli.phar file executable and available as wp command:
Code:
# chmod +x wp-cli.phar
# mv wp-cli.phar /usr/local/bin/wp

4) Run the desired command as you would in a regular (non-Plesk) WP-CLI.

Note: If you come across errors like -bash: php: command not found, add /opt/plesk/php/X.X/bin to $PATH, where X.X is your PHP version. For example:
Code:
export PATH=/opt/plesk/php/7.4/bin/:$PATH
 
Thank you so much for your explanation, It worked fine. I just hope they will update it soon or at least make a command to do that.
 
Hey there @Alnaggar, yesterday we've released WordPress Toolkit v5.6 that includes wp-cli updated to v2.5. Hope this helps!
 
Back
Top