skip to Main Content

I’ve trying to upload MP4 files into a WordPress media but the 413 error stop’s me. The limit of my life (in this immortal bug) is 100mb, more of that is the point to a beautiful HTTP ERROR.

My env have all in latest versions (PHP, NGINX, Ubuntu, FPM and FastCGI), in a digital ocean droplet.

My confs contains:

php.ini (FPM and CLI)

file_uploads = On
upload_max_filesize = 700M
max_file_uploads = 20
post_max_size = 710M
max_execution_time = 3000
max_input_time = 6000
memory_limit = 700M

nginx.conf and "site".conf (http, server and location contex)

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon image/jpeg image/png image/jpg;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 5000;
types_hash_max_size 2048;
client_max_body_size 700M;

I’ve try to add this to NGINX:

client_body_timeout   300;
client_header_timeout 300;
send_timeout 300;

Not work.

After all of my searches, the error persists and I won’t to see a exit to this error.

Please, anyone help me?

2

Answers


  1. Chosen as BEST ANSWER

    SOLVED!

    If do you use a CDN or similar service between client and server, see if this have limits to max upload files.

    In my case, i've use cloudflare and it don't show this limitation in any place and, not show a clarify error.

    However, thanks for all replys.


  2. If its a new Droplet, sometimes when you upload a local WordPress website to it, you need to change file permissions for www user. You might not have the permissions to do it.

    So try

    chown -Rf www-data.www-data /var/www/html/
    

    change the path /html/ according to your server setup

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search