How to fix a “URL Error #:Operation timed out after 300001 milliseconds with 0 bytes received” in WordPress

Solution:

Increase the request timeout with a http_request_timeout filter

function custom_http_request_timeout( ) {
    return 90;
}
add_filter( 'http_request_timeout', 'custom_http_request_timeout' );