You could be doing everything right, but sometimes WordPress still displays errors. Not to worry, though. It may not be your fault and there’s an easy fix.
By default, WordPress has a modest limit for uploading images, videos, and other files. It’s a similar story for your PHP memory limit, which helps you run plugins and scripts.
If you run a robust site full of rich content, this could be a big problem for you when those limits are reached. You may receive an upload error that looks like this:
The uploaded file exceeds the upload_max_filesize directive in php.ini
|upload_max_filesize = 1000M|
|post_max_size = 2000M|
|memory_limit = 3000M|
|file_uploads = On|
|max_execution_time = 180|