Save a file from web into Media Library in WordPress

You could use download_url to grab a file from a given URL, then use media_sideload_image to save it into Media Library and attach to a post (optional).

Share the post:Tweet about this on Twitter
Share on Facebook
0Share on LinkedIn

Submit a comment

Your email address will not be published. Required fields are marked *