admin管理员组文章数量:1130349
I have moved my website to new hosting.
The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/
Some images are showing but the majority are not, i've tried updating url's and rerferences in the database, and regenerating thumbnails and neither works.
I've also checked the server and the images are definitley there, but when i enter the direct url to the image, it 404's.
any ideas would be helpful
thanks in advance!
I wondered if anyone might have other ideas?
I have moved my website to new hosting.
The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/
Some images are showing but the majority are not, i've tried updating url's and rerferences in the database, and regenerating thumbnails and neither works.
I've also checked the server and the images are definitley there, but when i enter the direct url to the image, it 404's.
any ideas would be helpful
thanks in advance!
I wondered if anyone might have other ideas?
Share Improve this question asked Oct 29, 2018 at 20:02 reigns1989reigns1989 171 silver badge6 bronze badges1 Answer
Reset to default 0The issue is that images URLs are stored in the database as a full URL; domain and all.
When you move a site to a new URL, that doesn't update the URLs in the database. So a 'search and replace' process is needed to go through the database and replace your www.olddomain with your www.newdomain .
I usually use the "Better Search and Replace" plugin to do that. It works well (and easy and fast) to take care of the problem. You could also do it manually with MySQL commands, but a plugin is much faster.
A backup of your database before is always a good idea.
Added
You can verify in the generated page code source, or with Developer Tools (usually F12, then look at the Network tab and reload the page; see the URLs that are being requested for the images).
If the images are still 'scr' from the old domain, then that's how the URL is stored in the database. So the Search/Replace is needed.
Look at an existing Media item; you'll see that one of the fields (meta values) is the full URL of the media item. That comes from the database, so a Search/Replace will fix that.
It's possible that it is a caching issue on the phone or device. Restarting the device ought to fix that. But you can tell via Developer Tools, Network (or the page source) the URL being specified for the media item.
I have moved my website to new hosting.
The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/
Some images are showing but the majority are not, i've tried updating url's and rerferences in the database, and regenerating thumbnails and neither works.
I've also checked the server and the images are definitley there, but when i enter the direct url to the image, it 404's.
any ideas would be helpful
thanks in advance!
I wondered if anyone might have other ideas?
I have moved my website to new hosting.
The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/
Some images are showing but the majority are not, i've tried updating url's and rerferences in the database, and regenerating thumbnails and neither works.
I've also checked the server and the images are definitley there, but when i enter the direct url to the image, it 404's.
any ideas would be helpful
thanks in advance!
I wondered if anyone might have other ideas?
Share Improve this question asked Oct 29, 2018 at 20:02 reigns1989reigns1989 171 silver badge6 bronze badges1 Answer
Reset to default 0The issue is that images URLs are stored in the database as a full URL; domain and all.
When you move a site to a new URL, that doesn't update the URLs in the database. So a 'search and replace' process is needed to go through the database and replace your www.olddomain with your www.newdomain .
I usually use the "Better Search and Replace" plugin to do that. It works well (and easy and fast) to take care of the problem. You could also do it manually with MySQL commands, but a plugin is much faster.
A backup of your database before is always a good idea.
Added
You can verify in the generated page code source, or with Developer Tools (usually F12, then look at the Network tab and reload the page; see the URLs that are being requested for the images).
If the images are still 'scr' from the old domain, then that's how the URL is stored in the database. So the Search/Replace is needed.
Look at an existing Media item; you'll see that one of the fields (meta values) is the full URL of the media item. That comes from the database, so a Search/Replace will fix that.
It's possible that it is a caching issue on the phone or device. Restarting the device ought to fix that. But you can tell via Developer Tools, Network (or the page source) the URL being specified for the media item.
本文标签: After moving a site to new hostingnot all images are showing in media library
版权声明:本文标题:After moving a site to new hosting, not all images are showing in media library 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749222920a2335232.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论