How to fix media download
-
This fix worked for me. It replaces the deprecated wp_get_http call. YMMV.
Note: I had to edit the export file, since my sites are https and the export records all the links as http.
597d596 < 905c904,910 < $headers = wp_get_http( $url, $upload['file'] ); --- > $args = array('timeout' => 600, > 'stream' => true, > 'filename' => $upload['file'], > 'httpversion' => '1.1', > 'blocking' => true); > $response = wp_remote_get($url, $args); > $response_code = wp_remote_retrieve_response_code( $response ); 908c913 < if ( ! $headers ) { --- > if ( ! $response['headers'] ) { 914c919 < if ( $headers['response'] != '200' ) { --- > if ( $response_code != '200' ) {
- The topic ‘How to fix media download’ is closed to new replies.