In this example, I’m using ID 14988
Using Media Library
If you are logged in as admin, add the media ID in the website URL:
/wp-admin/upload.php?search=14983
then copy the file URL:
Using SQL
SELECT guid FROM wp_posts WHERE ID=14988
Using WPCLI
wp post get 14988 --field='guid'
or
wp db query "SELECT guid FROM $(wp db tables *_posts) WHERE ID=14988" | head -n 2 | tail -1
Was this post helpful?
Let me know if you liked the post. That’s the only way I can improve. 🙂