WordPress Upload Media Limit to 2MB


WordPress defaults upload limit to 2MB causing upload fail


WordPress on Docker with Nginx


Increase WordPress upload file size to 8MB. To check what is the current max upload size limit in your WordPress site then navigate to WP Admin -> Media -> Add New.

Step 1) Locate .htaccess file in root folder

Step 2) Edit with your favorite editor and insert below four lines of code after ifModule
php_value upload_max_filesize 8M
php_value post_max_size 8M
php_value max_execution_time 300
php_value max_input_time 300

Step 3) Save .htaccess file and refresh media upload screen to see the new upload limit

If you still have problem upload, refer to increase Nginx client max body size here