1

Linked images on old article is pointing to:

/wp-content/uploads/YEAR/MONTH/filename.jpg 

and isn't found.

Because the correct URL/Folder structure I got is:

/wp-content/uploads/YEAR/MONTH/Some_Unique_ID/filename.jpg

I grab all these files from AWS S3. Folder structure intact.

This Some_Unique_ID folder isn't present on new uploads.

Was this cause by Wordpress Update as I recall I updated it after moving to new server also.

How can I fix this?

Thanks!

3
  • Okay I got the reason why it's happening now, it's because of: Offload S3 Lite Plugin > Object Versioning Feature > deliciousbrains.com/wp-offload-s3/doc/settings/… And we don't use that anymore now since we ditch AWS S3.
    – Nadz Dan
    Feb 16 '18 at 18:01
  • I already posted on the Plugin Support: wordpress.org/support/topic/… . I hope someone here already encounter this and have proper solution.
    – Nadz Dan
    Feb 16 '18 at 18:19
  • Eliminating this Some_Unique_ID folder will solve this problem: /wp-content/uploads/YEAR/MONTH/Some_Unique_ID/filename.jpg Moving all files under /year/month/Some_Unique_ID/* back to /year/month/ folder. I don't care leaving all those empty folder as long as it will solve the problem.
    – Nadz Dan
    Feb 16 '18 at 18:43
0

You can export the database:

mysqldump -u [db_username] --password=[db_password] "[db_name]" > "[db_name].sql"

Then you can use the tool of your choice to remove the unique ids:

sed -i -e 's/unique-id//g' [db_name].sql

Then import the resulting SQL file.

2
  • It's not the wordpress or database has the problem but the folder structures. By the way it's solved now.
    – Nadz Dan
    Feb 17 '18 at 20:45
  • Oh I’m sorry I thought you where referring to broken links in the content which IS IN THE DATABASE 😀 Feb 18 '18 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.