I’m facing a persistent issue with my WordPress site when trying to upload large files in Google Chrome. The error I keep encountering is:
413 Request Entity Too Large
I’ve tried troubleshooting this extensively, but nothing seems to work. Here’s my setup and what I’ve done so far:
Setup:
- Environment: WordPress in a Docker container.
- Server: NGINX as a reverse proxy using NGINX Proxy Manager.
- PHP: Running with a dedicated
php.ini
file. - Browser: Issue is consistent
- Plugin: https://de.wordpress.org/plugins/all-in-one-wp-migration/
He is always uploading up to 100% and than i get this issue.
Uploading up to 100%
enter image description here
Different Browser, same way, same issue.
services:
db:
image: mariadb:10.5
container_name: wp_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: ""
volumes:
- ./volumes/db_data:/var/lib/mysql
networks:
- wpnet
redis:
image: redis:6-alpine
container_name: wp_redis
restart: always
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./volumes/redis_data:/data
networks:
- wpnet
app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: proxy_manager
restart: unless-stopped
ports:
- '80:80'
- '443:443'
- '127.0.0.1:81:81'
# - '81:81'
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "proxymanager"
DB_MYSQL_PASSWORD: ""
DB_MYSQL_NAME: "proxymanager"
volumes:
- ./volumes/proxymanager/data:/data
- ./volumes/proxymanager/letsencrypt:/etc/letsencrypt
networks:
- wpnet
wordpress1:
image: wordpress:latest
container_name: wordpress1
restart: always
environment:
WORDPRESS_DB_HOST: "db:3306"
WORDPRESS_DB_USER: "wordpress1"
WORDPRESS_DB_PASSWORD: ""
WORDPRESS_DB_NAME: "wordpress1"
WORDPRESS_DEBUG: "true"
volumes:
- ./volumes/wordpress1:/var/www/html
- ./volumes/wordpress1/custom_configs/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
networks:
- wpnet
networks:
wpnet:
driver: bridge
What I’ve Tried:
1. PHP Configuration
I ensured the following settings in my php.ini
:
memory_limit = 1G
upload_max_filesize = 5G
post_max_size = 5G
max_execution_time = 600
I verified these values using a phpinfo()
page, and they are applied correctly.
2. NGINX Configuration
I added the following directive in NGINX Proxy Manager under the “Custom Nginx Configuration” for my WordPress site:
client_max_body_size 5G;
This didn’t resolve the issue.
3. WordPress Configuration
In my wp-config.php
, I added:
@ini_set('upload_max_filesize', '5G');
@ini_set('post_max_size', '5G');
@ini_set('memory_limit', '1G');
@ini_set('max_execution_time', '600');
I also enabled debugging with:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
No relevant errors are logged.
4. Testing with Smaller Files
Uploads of smaller files work fine, so this seems related to size limits.
5. Error Logs
- Docker Logs: Show no errors related to the issue.
- PHP Logs: Nothing unusual or helpful logged.
- NGINX Logs: No errors indicating the cause.
What I Need:
I’ve exhausted all the usual troubleshooting steps, but the issue persists. Has anyone encountered this before? Are there any browser-specific settings or additional configurations I might be missing for Chrome?
Any help would be greatly appreciated!
Thanks in advance for your insights.
4