Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress Cron: Running as which user?

Tags:

cron

wordpress

I'm writing a plugin. It has some job to be execute by wp_cron. Now within the script, it create/edit some posts automatically. So which user will be running the cron job?

Also I notice it failed when calling WP_Filesystem()

like image 673
faulty Avatar asked Nov 06 '25 04:11

faulty


1 Answers

Well I've found out that it's running as no one, as get_current_user_id() returns 0

like image 80
faulty Avatar answered Nov 09 '25 10:11

faulty