In this example, I’m using ID 14988
Using Media Library
then copy the file URL:
SELECT guid FROM wp_posts WHERE ID=14988
wp post get 14988 --field='guid'
wp db query "SELECT guid FROM $(wp db tables *_posts) WHERE ID=14988" | head -n 2 | tail -1
See also WordPress database error Table ‘./db/wp_options’ is marked as crashed and should be repaired [✔️ SOLVED]
Was this post helpful?
Let me know if you liked the post. That’s the only way I can improve. 🙂