Plesk for Linux
kb: how-to
ext: wptk
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to integrate wp-cli in Plesk?
Answer
Wordpress Toolkit provides CLI utility based on wp-cli. It can be used with the following command:
# plesk ext wp-toolkit --wp-cli -instance-id -- [ID] [command] [options]
Refer to the Plesk documentation for usage examples.
Comments
10 comments
The link to the documentation is broken, maybe it should be this:
https://docs.plesk.com/en-US/onyx/cli-linux/using-command-line-utilities/wptoolkit-wordpress-toolkit.78685/
@Maghreb Services SARL
Thank you for noticing! I have changed the link accordingly.
For some reason, WP CLI import command [https://developer.wordpress.org/cli/commands/import/] does not work. It is giving the error WordPress Importer needs to be activated. Try 'wp plugin activate wordpress-importer'.
Is this a feature that hasn't been implemented?
Hello @George Georgopoulos,
The "plesk ext wp-toolkit --wp-cli" utility is not a full replacement of native "wp" utility
It has limited functionality and "import" is not supported Plesk "wp-cli" command
Hi Support Plesk,
I want to know if Plesk + WP-CLI is working well?
Can Plesk + WP-CLI + SSH be used by customers?
If the customers with SSH rights executes the WP-CLI command, will it affect security, is the data of other customers on the same server separate from each other?
@Phi Nguyen
Hi,
I can see that you got an answer to your question in a support ticket.
Anyway, let me answer it here for others: WP-CLI utility can be run only by administrator of the server, in other words by root user.
Nikita Marinchuk
Hi, I'm trying to regenerate media and I thought the command media was available in WP-CLI...
plesk ext wp-toolkit --wp-cli -instance-id 2 -path /var/www/vhosts/xxx/httpdocs -- media regenerate --yes
not working for me... tried even to install wp-cli.phar
I really need to regenerate thumbnails, if command is not available how do I go about making a complete WP-CLI installation on Plesk? I also would like to use Smush, Media Cleaner and others with WP-CLI...
thanks
Hello Project Aspen,
> not working for me... tried even to install wp-cli.phar
Was there any error displayed?
Have you used commands like described here to install wp-cli.phar?
HI Ivan, your 'here' link is broken.
Thank you @Sharul, it's fixed.
Please sign in to leave a comment.