Do this posts have anything in common?
Where will you insert the hyperlink? If it is at the beginning or at the end, it would be easy. Else, not.
Something like this would do:
$args = array( 'post_type' => 'post', 'numberposts' => -1, 'post_status' => 'published' );
$posts = get_posts( $args );
foreach ( $posts as $post ) {
$po = array();
$po = get_post( $post->ID, 'ARRAY_A' );
$po['post_content'] = $post->post_content . '<br><a href="#">My hyperlink</a>';
//wp_update_post( $po );
}
Please note that wp_update_post is disabled.
Backup of your database before anything!
You can use the previous code without wp_update_post for testing purposes inside a custom template.
To do the real thing, encapsulate the code above in a plugin:
<?php
/*
Plugin Name: Insert Link in ALL Posts
*/
register_activation_hook( __FILE__, 'insert_links_in_posts_activation_run' );
function insert_links_in_posts_activation_run()
{
// put the first code here and enable wp_update_post
}
Put the code in a PHP file, upload to your plugins directory, activate.
It will run only once on activation.
Deactivate it.
Check posts.
I tested in a local install and works ok, but proceed at your own risk.