Comments on: Get Started Making Your Own WP-CLI Commands https://webdevstudios.com/2019/10/08/making-wp-cli-commands/ WordPress Design and Development Agency Mon, 15 Apr 2024 15:58:20 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: David Hocking https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-155547 Sun, 07 May 2023 09:31:42 +0000 https://webdevstudios.com/?p=21159#comment-155547 oh,the most important part is in the last reply to last comment.anyway answered my question

]]>
By: Greg https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-135633 Mon, 18 Apr 2022 13:04:48 +0000 https://webdevstudios.com/?p=21159#comment-135633 In reply to Arnout.

Just figuring that out too. Here are the steps to get going:

1) Create a new directory under wp-content/plugins called wps –
[Wordpress root]/wp-content/plugins/wps

2) Place the example file in that directory-
[Wordpress root]/wp-content/plugins/wps/wds-hello-world.php

3) Use the wp CLI to activate the new plugin with this command –
wp plugin activate wds

4) Run the command to test –
% wp wds hello_world
Hello World!

And NOTE – DO NOT DO THIS ON A PRODUCTION WEBSITE! You could open a security hole or crash your whole site. You have been warned!

]]>
By: Arnout https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-108542 Thu, 10 Jun 2021 07:22:10 +0000 https://webdevstudios.com/?p=21159#comment-108542 Where should you put the class and how should you include it?
Will it get loaded in all of wordpress or just by wp-cli?

]]>
By: Scott Anderson https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-86142 Thu, 09 Jan 2020 13:17:52 +0000 https://webdevstudios.com/?p=21159#comment-86142 In reply to bk KALIA.

As WP CLI acts like any other CLI command one thing you might consider is have a server cronjob run a WP CLI IMPORT command on a timed interval (your trigger). Then use the XML file as a data source for your import command.

]]>
By: bk KALIA https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-85227 Tue, 31 Dec 2019 11:08:44 +0000 https://webdevstudios.com/?p=21159#comment-85227 nice article Scott.
I have website hosted on google cloud & I regularly use WP CLI IMPORT for posts via putty ssh connection.
As we publish 2000-5000 posts daily many times connection interrupts.
So, I’m looking for a way to run wp import trigger whenever we upload xml to a particular folder on server.
Your guidance will help a lot.

]]>
By: Scott Anderson https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-77761 Wed, 09 Oct 2019 18:34:22 +0000 https://webdevstudios.com/?p=21159#comment-77761 In reply to Numan.

Good afternoon Numan, I’m glad I could help.

]]>
By: Numan https://webdevstudios.com/2019/10/08/making-wp-cli-commands/#comment-77649 Tue, 08 Oct 2019 21:32:27 +0000 https://webdevstudios.com/?p=21159#comment-77649 That is great article for me as a beginner level. I think it help me to reach my next level…

]]>