1

I would like to set cron job in WordPress with WP Crontrol for update translations automatically. If I saw it right I have to create a PHP code (simple plugin) and then schedule it with mentioned plugin. How is it possible?

0

I found wp cli based solution. These below commands are useful for update translate files for core, themes and plugins:

wp language core update
wp language theme update --all
wp language plugin update --all

To schedule these commands, insert this line in crontab:

30 0 * * * wp language core update ; wp language theme update --all ; wp language plugin update --all

It will update all translate files once a day.

Shorter version of cron job:

30 0 * * * for i in "core update" "theme update --all" "plugin update --all"; do sudo wp  language $i; done
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.