Failed To Import Media

Published by

on

Image of WordPress Logo

The following instruction will help you to resolve failed to import media when you try to import media files from another website.

The error message you usually will see are:

 

error message text

 

Error message text image

 

Failed to import Media “android-chrome-512×512”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “cropped-android-chrome-512×512-1.png”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “DHU6color”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “DHU6textcolor”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “DHU6white”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “cropped-DHU6white.png”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “cropped-cropped-DHU6white.png”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)
Failed to import Media “cropped-DHU6color.png”: Request failed due to an error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (http_request_failed)

The solution to resolve this type of issue is to add the following lines to wp-config.php file.

add_filter(‘https_ssl_verify’, ‘__return_false’);
add_filter(‘https_local_ssl_verify’, ‘__return_false’);

You will need to add these lines at the very end of the file. Otherwise, you may break the website.

Source:

https://stackoverflow.com/questions/29080397/wordpress-cron-error-ssl-certificate-unable-to-get-local-issuer-certificate