Media file names uploaded in 2018 all are broken


i was working on a website since 2018 on test link (test hosting)
2 days before we went live and i migrated the website to real host !

the problem is i have many PDF files uploaded into media library
i found all links are broken and it is working only when i change URL
to match current year and month
wp-content/uploads/2018/12/1.pdf (not working)
when i change to:
wp-content/uploads/2019/06/1.pdf (working)

i have a hundreds of files how can i solve this issue?

Hello there,

I am not sure if it’s caused by a theme’s code. Sydney doesn’t have a function to modify any file path. To confirm it yourself, you can try temporarily switching to one of default WordPress themes.

Probably someone has changed/renamed the upload folder? You could inspect it in file manager of your web host, or use FTP client program.

I’d recommend you consult to your web hosting’s support department. They might have to check their system to check if your site had been hacked.