Reputation: 133
I have just migrated the website to new hosting and since then when I tried to upload new media files into the library, it always had HTTP error and media thumbnails are looking like in the attached picture.
I tried to find solution on the internet - removed and added new .htaccess file or added some code in it - none of these work. Has anyone ever faced this problem before? What's the solution?
Thank you, Scott
Upvotes: 1
Views: 998
Reputation: 1
adding this as might help someone, an annoying error of my side.
Issue: migrated from localhost to a provider (in a fast maybe hacky way:)
Changing the file db.sql:
changed the url 'localhost' to the domain, in the options-table (manually, typing it, the 2 rows)
replaced (as a String search-replace action) all localhost-links, globally (I used VIM :%s/localhost:8080/mydomain.com/g )
replaced (as a String search-replace action) the (default) table prefix "wp_" to 'mine': "mf_", globally (also VIM, as above)
Done with the db.sql. Now, uploaded (by filezilla) the files, recreated the db at the hosting provider by 'import' of the db.sql. Did also: set all file and folder permissions as suggested in the web on many places. Did not forget to set stricter permissions for wp-config, and the 644 for .htaccess.
Issue: can access the application, can see (as admin) the media grid. However, all thumbnails were grey, and checking all suggestion as above and in other websites (like the access permissions) it seemed correctly set.
SOLUTION: In the table postmeta (!!!) there are attributes set to images, containing the text-part "wp". By changing the file db.sql globally, all "wp_" (the default prefix for the tables) to 'mine' ("mf_"), these attribute names were also changed.
(what i did then: exported the table postmeta and replace by VIM globally "mf_" again with "wp_", re-imported the table)
Please note: i am not a web developer and i am aware that it might not be the way supposed to be done, but it is the fastest, without much manual clicking around etc.
Maybe it helps someone, it happened a few times to me, so hopefully next time I myself will look into this stackoverflow answer, the idea of re-uploading the images (as suggested in several places) when they are already there is sort of daunting to me.
Upvotes: 0
Reputation: 1083
This is a very annoying problem. In my experience, it causes due to three reasons;
wp-content/uploads
folder.You can share some more details for further discussion.
Upvotes: 1