HTTP Error on Image Uploader WordPress Nignx

How to resolve HTTP error for WordPress with Nginx

Are you trying to upload an image or PDF larger than 1 MB into WordPress using the media upload and receiving an HTTP Error”? Do you want to configure your Nginx powered WordPress site to allow uploads larger than 2MB?

If so you’ve probably already sifted through many forms and blog posts about modifying the PHP.ini file. However doing the PHP.ini modification will not work if you are running Nginx as your web server (instead of Apache). In order to resolve the “HTTP error”, you need to modify your nginx.conf file.

1. Open you nginx.conf file. It’s most likely at etc/nginx/nginx.conf.

2. Add the following lines to the http{} section of the nginx.conf file (I recommend commenting before the line for future reference).

3. Restart nginx.

Additional Notes

Typically I also increase the max file upload size and the post max upload size in the PHP.ini.

If you have any specific questions please leave a comment and I’ll do my best to respond. Stop by DigiMix Web Design New York if you are looking for professional WordPress developers for your project. Thanks for reading and happy coding.