Programatically change post author

It shouldn’t be any problem. Try this:

$arg = array(
    'ID' => $post_id,
    'post_author' => $user_id,
);
wp_update_post( $arg );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)