Over the last few days when I’ve tried to upload images over a certain size, I’ve been greeted with this lovely WordPress HTTP error message right after the upload fails:
The problem here is with NGINX configuration (or, if you’re using Apache, check out this blog post.)
Turns out there’s a very simple fix!
Step 1: Log in to your VPS or FTP or however you edit your WordPress files.
Step 2: Open the
nginx.conf file located at
Step 3: Add
client_max_body_size 2m; to the
http section. It should look something like this:
Note: This limits uploads to 2mb, which is generally the image size limit for WordPress. You can change
client_max_body_size to whatever you’d like, but WordPress limits must be adjusted elsewhere. See NGINX documentation on
Step 4: Restart NGINX. If you’re using the command line of a VPS, simply type
sudo service nginx restart.