Change Attachment URLs in database SQL query
-
Hello !
I’ve been looking for days all over google to find good way to change ULR of files in media library using SQL query, after mooving files to new folder structure.
I had more than 10 000 files in uploads folder because the structure uploads/year/month wasn’t activated on the website I’m working on, so I rebuild the proper folder organization and move all files.
I couldn’t find a good answer on how to update database, I made huge SQL script files updating each files URL in database, some people says we have to update the table post_content, other says we have to update postmeta as well, and GUID too but not sure about this…
I read as well we should use absolute path instead of relative path…. I tried almost everything but nothing works for me.
So I’m lost and couldn’t find proper queries to get a clean media library.
Any usefull information about how to proceed ?
Thank you guys !
- The topic ‘Change Attachment URLs in database SQL query’ is closed to new replies.