Media library disallows spammy filenames?

No, WordPress doesn’t do this. You can check by looking at the source code. What’s probably happening is the image is too large for WordPress to resize properly, or it’s been corrupted. Keep in mind that there are breweries with websites powered by WordPress, and you can buy beer themes on markets

Reorder attachements in the media library

Attachments in Media Library are obtained using WP_Query, so you can modify that query with pre_get_posts action. By default they are sorted DESC by post_date. So the easiest way to fix your code would be to change so the new modified attachment has the same post_date set as the original one.

Remove delete-attachment button for every media

Rather than focusing on the button itself, focus on what you want users to do. If you don’t want your users to be able to delete media, and you are also comfortable with them not being able to delete other post types (Posts, Pages, etc.), you can create a custom role for these users. <?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)