Question

Uploading Plugin/Theme in WP results in Secure Connection Failed

I am using Ubuntu 16.4 nginx as a reverse proxy and Apache php-fpm with varnish for caching. SSL traffic is being routed through nginx and any non ssl traffic is being redirect to https in the varnish config.

When I try to upload a plugin that is over 2M I get various errors relating to the server

In firefox I consistently get Secure Connection Failed

In Chrome I get…

This site can’t be reached

The webpage at https://domain.com/wp-admin/update.php?action=upload-theme might be temporarily down or it may have moved permanently to a new web address. ERR_FAILED

If I try to upload something to the media library I get http error if the file is large if the file is not over 2M it uploads fine.

I have increased my limits in my php.ini file and it is reflected everywhere…

Maximum upload file size: 128 MB.

the post size also…

Anyone have any insight?

Thanks!!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I was able to get this working. Turned out all I needed to do was add the following directive to the nginx vhost file…

/etc/nginx/sites-availiable/default

 server {
      ..............
      client_max_body_size 100m;

    location / {
         ..........
     }
    }

This seemed to work for me but I am not sure why this is needed when I am setting things in my php.ini file.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel