I'm hosting a wp site on my own server (at home) and I would like to use wp cli to import media from my own computer. On my computer, I have a web server and I asks to wp-cli to import media from "http://192.168.0.2/wpTemp/media.txt".
It fails! After investigations, it is due to the ip address which is not recognized as "safe" by download_url() => wp_safe_remote_get().
Is there a way to configure wp to allow only 192.168.0.2 ? and keep the protection for everything else. (I'll also need to know where to put the modification, I don't want to redo the modification after wp update).
Thank you for your time!
The code of the problem: https://developer.wordpress.org/reference/functions/wp_http_validate_url/ line 566 return false and marks the url as invalid.
wp import
command to import? According to the docs you should be providing a path to a WXR file, not a URL.