I'm trying to have my posts published when wp_posts.ID IN (list). Is it advisable to do it with an event in MySQL/MariaDB? Would it mess up the cache? Is it enough to just do

posts_status = 'publish'
wp_posts.ID IN (list)

? I found one answer that could be the solution here https://wordpress.stackexchange.com/a/313060/151436 but I'm not really sure how to implement it.

Also, it would be great if a solution had like a minute gap between publishing, so it doesn't slow down the server.

Any help would be greatly apriciated! Thank you

  • Back up. What are you actually trying to do here? Why would a post auto publish just if it happened to have a certain ID? That post could be a menu item, attachment, or customiser change set. You don’t know. – Jacob Peattie Nov 1 '19 at 14:29
  • @JacobPeattie Thank you for your comment. I do know. I have MySQL view on the other side that's getting 'filled' with post ID's if the criteria is met. That side works great and it's all actual posts. So the 'list' part above is actually 'SELECT post_id FROM view_name...' – inside83 Nov 1 '19 at 18:55

Your Answer

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

Browse other questions tagged or ask your own question.