If you’re planning on staying with WordPress 4.9.x, this following plugin will make sure your site doesn’t update to WordPress 5.x. It will not prevent you from installing any WordPress 4.9.x security updates as they are released. If you’re not sure how to add this code to your site, see below.
Make it a Plugin
To turn the code above into a working plugin, just copy the code into a file named, say,
prevent-wp5-update.php and place that file into your
/wp-content/plugins/ directory. Then, you can activate it in your dashboard, just like any other plugin.