Why is the connection reset when uploading Wordpress plugin or theme on Ubuntu Why is the connection reset when uploading Wordpress plugin or theme on Ubuntu wordpress wordpress

Why is the connection reset when uploading Wordpress plugin or theme on Ubuntu


As Atanas suggested in the answer posted for Apache, the problem was maximum file upload size in the web-server config.

To resolve the error in NGINX, I placed the following in the server block:

client_max_body_size 100M;

(adjust to the size of your desired max upload size as required).

For example here is the full NGINX config I am running, with the above variable set:

{    listen 80 default_server;    listen [::]:80 default_server;    client_max_body_size 100M;    root /var/www/html;    index index.php index.html index.htm index.nginx-debian.html;    server_name xxx.xxx.xx.xxx;    location / {        try_files $uri $uri/ /index.php?$args;    }    location ~ \.php$ {        include snippets/fastcgi-php.conf;        fastcgi_pass unix:/var/run/php5-fpm.sock;    }    location ~ /\.ht {        deny all;    }}


I have the same problem and solve it by editing my htaccess, and it looks like this:

 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule># END WordPress    # WP Maximum Execution Time Exceeded    <IfModule mod_php7.c>    php_value max_execution_time 300    php_value upload_max_filesize 50M    php_value post_max_size 80M    php_value max_input_time 300</IfModule>    php_value max_execution_time 3000</IfModule> 
  1. Install the plugin "WP Maximum Execution Time Exceeded" (It will help your files not breaking when uploading)
  2. Then only add this part at the end of the htaccess:

    # WP Maximum Execution Time Exceeded<IfModule mod_php7.c>php_value max_execution_time 300php_value upload_max_filesize 50Mphp_value post_max_size 80Mphp_value max_input_time 300</IfModule>    php_value max_execution_time 3000</IfModule> 

    Of course you can also change the numbers!

That helped me! Hope will help you also!

Atanas