Ready to get started?Download WordPress


Manually Publishing Posts (2 posts)

  1. dappleyard
    Posted 6 years ago #


    I have a queue of posts marked as Drafts, and I'd like to run a Cron Job to publish two of these automatically every morning.

    I just wondered what changes I need to make to the WordPress database with a script in order to make the two posts live?

    Thanks for your assistance

  2. Michael Fields
    Posted 6 years ago #

    You would have to set "post_status" to "publish" and (if using permalinks) you will want to set a "post_name". This can be created by running the "post_title" through the sanitize_title_with_dashes() function.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.