Sorry there was something wrong with my server, it failed to connect to other services too. I rebooted the server and everything seems to be working now!
Thank you very much for your quick fix and response.
Thank you very much, Prashant. Updated to 5.0.3 and everything works great.
I really appreciate that you quickly responded and fixed the bug.
The script can be as simple as this:
<?php
require_once 'wp-load.php';
echo "Test";