Nginx server – How to fix HTTP error when uploading images to WordPress

Saul Goodman May 16, 2019 Loading...

This article will help you fix Http Error when uploading images to WordPress on an Nginx server.

1. Change client_max_body_size

Open the configuration file for your Nginx server:

sudo nano /etc/nginx/nginx.conf

Locate “client_max_body_size” and increase its value:

client_max_body_size 256M;

Save the file and restart Nginx:

sudo systemctl restart nginx

2. Edit the “php.ini” file.

Your “php.ini” file is located somewhere in “/etc/php/…” (depending on your PHP version). Open it and edit the following lines:

upload_max_filesize = 32M
post_max_size = 48M
max_execution_time = 500

Save and close the file, restart your server and try uploading images to your WordPress website.

Hope this can help your solve your problem!

Related posts

Welcome to KINDACODE. Have a nice day and code well!