WP media upload issues

You could look here https://www.digitalocean.com/community/questions/wordpress-the-uploaded-file-could-not-be-moved-to-wp-content-uploads for some good answers.

How to display the maximum upload size in a WordPress single site?

The answer actually lies on the same page where you inspected your modifications: /wp-admin/media-new.php. If you get to the /wp-admin/media-new.php file, you will get a function: <?php media_upload_form(); ?> And the function is located in /wp-admin/includes/media.php, where you will get the following line: $max_upload_size = wp_max_upload_size(); So the holly grail you are searching is: wp_max_upload_size(). … Read more

Unable to upload images into the media library

With help from @simongcc and https://fancythemes.com/fix-image-upload-issue-wordpress I’ve found that the Settings > Media > Store uploads in this folder value was not correct and after updating with the correct path I was able to successfully upload pictures.

Missing a temporary folder not fixed

You need to add that line to your wp-config.php. Double check that you put it in the right place. You need to set the permissions on that directory you created so that WordPress can write to it. This is dependent on how your hosting works and what program you’re using, but you should try setting … Read more

Remove files unrelated to WordPress from uploads

I don’t know whether there is a better WP-CLI way or not, but you could write a simple script that recursively crawls your uploads directory (or it’s subdirectories) and than check the absolute paths (URLs) of those files and compare them against guid column in wp_posts table. If your file is not there, WordPress doesn’t … Read more