How to enable uploads of files larger than 2MB to your WordPress-site (using NGINX)

I. Configure PHP-FPM

We start by editing the PHP-FPM configuration file php.ini found here on Debian Buster (replace “7.3” with whatever version you’re running).

nano /etc/php/7.3/fpm/php.ini

Add the following lines at the very end of the file. (Check out what this actually does on https://www.php.net/manual/en/ini.core.php)

upload_max_filesize = 100M post_max_size = 100M

Reload the PHP-FPM service.

systemctl reload php7.3-fpm

II. Configure NGINX

Now we configure the NGINX website configuration file on the host (note: not on the reverse proxy).

nano /etc/nginx/sites-available/website.com

So that it looks something like this. (Find out what the added line does here: https://nginx.org/en/docs/http/ngx_http_core_module.html).

server { listen 80; root /var/www/html/website.com; server_name website.com; location / { index index.php index.html; try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; client_max_body_size 100M; # Add this line! } }

Now we check if we did anything wrong and if not, reload the NGINX service.

nginx -t systemctl reload nginx

And that should do it. Now I can finally upload those huge images SEO:s love.

1,074 thoughts on “How to enable uploads of files larger than 2MB to your WordPress-site (using NGINX)”

  1. Great post. I was checking constantly this blog and I’m impressed! Extremely useful information specially the last part 🙂 I care for such info much. I was seeking this particular information for a very long time. Thank you and good luck.|

  2. At this moment I am going to do my breakfast, once having my breakfast coming again to read more news.|

  3. Hello! I know this is kinda off topic but I’d figured I’d ask. Would you be interested in trading links or maybe guest authoring a blog post or vice-versa? My site addresses a lot of the same subjects as yours and I feel we could greatly benefit from each other. If you are interested feel free to send me an email. I look forward to hearing from you! Wonderful blog by the way!|

  4. Nice post. I was checking constantly this blog and I am impressed! Extremely helpful info specially the last part 🙂 I care for such info much. I was looking for this particular info for a very long time. Thank you and good luck.|

  5. Nice post. I learn something totally new and challenging on websites I stumbleupon every day. It’s always useful to read articles from other authors and use a little something from their sites. |

  6. I take pleasure in, cause I found exactly what I used to be having a look for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye|

  7. I’m now not certain where you are getting your information, but good topic. I must spend a while studying much more or working out more. Thanks for excellent info I used to be looking for this info for my mission.|

  8. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.|

  9. Quality articles or reviews is the important to attract the visitors to visit the web page, that’s what this website is providing.|

  10. My spouse and I absolutely love your blog and find most of your post’s to be what precisely I’m looking for. Do you offer guest writers to write content available for you? I wouldn’t mind creating a post or elaborating on a lot of the subjects you write regarding here. Again, awesome weblog!|

  11. I want to to thank you for this great read!! I absolutely loved every little bit of it. I have got you book marked to look at new things you post…|

  12. I’m curious to find out what blog system you happen to be using? I’m having some minor security issues with my latest website and I would like to find something more secure. Do you have any suggestions?|

  13. I’m not sure where you are getting your info, but good topic. I needs to spend some time learning more or understanding more. Thanks for great information I was looking for this info for my mission.|

  14. I’m not that much of a internet reader to be honest but your blogs really nice, keep it up!
    I’ll go ahead and bookmark your site to come back later on. Many thanks

  15. Знаете ли вы?
    Советские военные операторы на базе ленд-лизовского кинопулемёта и ППШ создали киноавтомат.
    В игре про выгорание отражён печальный личный опыт главного разработчика.
    Команды тренера года АБА и НБА ни разу не стали в них финалистками.
    Персонажу французской комедии о Фантомасе советские подростки подражали всерьёз.
    «С любимыми не расставайтесь…» автор написал после того, как чуть не погиб в железнодорожной катастрофе.

    arbeca

  16. Hello everybody, here every person is sharing these kinds of familiarity, thus it’s good to read this weblog, and I used to pay a visit this weblog everyday.|

  17. Thanks for one’s marvelous posting! I truly enjoyed reading it, you could be a great author.I will be sure to bookmark your blog and will eventually come back in the future. I want to encourage you continue your great work, have a nice day!|

  18. Fascinating blog! Is your theme custom made or did you download
    it from somewhere? A theme like yours with a few simple tweeks would really make my blog stand out.
    Please let me know where you got your design. Thanks a
    lot

  19. Hi would you mind stating which blog platform you’re using? I’m looking to start my own blog in the near future but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S My apologies for getting off-topic but I had to ask!|

  20. I think the admin of this website is truly working hard in support of his website, for the reason that here every data is quality based material.|

  21. When I initially commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I get 4 emails with the exact same comment. Is there a means you can remove me from that service? Many thanks!|

  22. I believe that is among the most significant information for me. And i am glad reading your article. But want to observation on few normal things, The web site taste is ideal, the articles is actually nice : D. Good process, cheers|

  23. wonderful issues altogether, you simply won a new reader. What would you suggest about your post that you made some days ago? Any sure?|

  24. Hello there! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My weblog looks weird when browsing from my iphone 4. I’m trying to find a theme or plugin that might be able to correct this issue. If you have any suggestions, please share. Cheers!|

  25. You could certainly see your enthusiasm in the article you write. The arena hopes for even more passionate writers such as you who aren’t afraid to mention how they believe. At all times go after your heart.|

  26. Hi there! This post couldn’t be written any better! Going through this article reminds me of my previous roommate! He continually kept preaching about this. I most certainly will send this post to him. Fairly certain he will have a very good read. Thanks for sharing!|

  27. This is very interesting, You are a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your fantastic post. Also, I’ve shared your site in my social networks!|

  28. I think this is among the most important information for me. And i am glad reading your article. But want to remark on some general things, The site style is great, the articles is really excellent : D. Good job, cheers|

  29. I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly very often inside case you shield this increase.|

  30. Hi, i think that i saw you visited my website thus i came to return the prefer?.I
    am attempting to find things to enhance my site!I guess its good enough to use some of your ideas!!

  31. I’m very pleased to find this site. I want to to thank you for ones time for this fantastic read!! I definitely enjoyed every part of it and i also have you saved to fav to check out new stuff on your blog.|

  32. I love your blog.. very nice colors & theme.
    Did you design this website yourself or did you hire someone to do it for you?
    Plz answer back as I’m looking to create my own blog and would
    like to know where u got this from. many thanks

  33. Excellent post. Keep writing such kind of info on your blog.
    Im really impressed by your blog.
    Hey there, You have performed a great job. I will definitely
    digg it and individually suggest to my friends. I’m sure they will be benefited from this website.

  34. Hi there colleagues, how is all, and what you would like to say regarding this post, in my view its actually remarkable designed for me.|

  35. Wow! After all I got a webpage from where I be able to genuinely obtain helpful information concerning my study and knowledge.|

  36. What i do not realize is in fact how you’re not really a lot more smartly-liked than you may be right now. You’re so intelligent. You recognize thus considerably relating to this matter, produced me in my opinion consider it from so many various angles. Its like women and men are not interested until it is something to accomplish with Lady gaga! Your own stuffs great. Always take care of it up!|

  37. I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly a lot often inside case you shield this hike.|

  38. Thank you for every other excellent article. The place else may just anybody get that type of info in such a perfect way of writing? I have a presentation next week, and I’m at the search for such information.|

  39. I’ve been browsing on-line more than three hours today, yet I by no means found any interesting article like yours. It’s pretty worth sufficient for me. In my opinion, if all site owners and bloggers made good content material as you did, the internet will likely be a lot more useful than ever before.|

  40. I do not even know how I ended up here, but I thought this post was good. I do not know who you are but definitely you’re going to a famous blogger if you aren’t already 😉 Cheers!|

  41. Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful blog!|

  42. F*ckin’ amazing things here. I’m very happy to look your article. Thank you a lot and i’m taking a look ahead to contact you. Will you kindly drop me a e-mail?

  43. Many thanks for being my lecturer on this issue. I enjoyed your article a lot and most of all enjoyed reading how you really handled the areas I widely known as controversial. You’re always very kind towards readers really like me and let me in my living. Thank you.

  44. I really wanted to compose a quick message in order to thank you for the wonderful tips and tricks you are posting on this site. My incredibly long internet search has at the end been paid with reputable ideas to go over with my colleagues. I would believe that most of us site visitors are undoubtedly fortunate to dwell in a fabulous community with many awesome individuals with very helpful ideas. I feel somewhat lucky to have encountered your entire web page and look forward to really more pleasurable minutes reading here. Thank you once again for a lot of things.

  45. I really wanted to post a message in order to appreciate you for these fabulous guidelines you are posting at this website. My particularly long internet lookup has at the end of the day been recognized with pleasant insight to talk about with my good friends. I would tell you that most of us readers actually are very fortunate to be in a magnificent network with so many special individuals with very helpful points. I feel somewhat happy to have seen your website and look forward to some more entertaining moments reading here. Thanks again for everything.

  46. Howdy would you mind stating which blog platform you’re working with? I’m looking to start my own blog soon but I’m having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely unique. P.S My apologies for being off-topic but I had to ask!|

  47. Thanks for sharing excellent informations. Your website is very cool. I’m impressed by the details that you have on this web site. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found just the info I already searched all over the place and just couldn’t come across. What a perfect web-site.

  48. I wish to express my admiration for your generosity giving support to those people that really want assistance with your area of interest. Your special commitment to getting the solution up and down became surprisingly effective and has all the time enabled guys and women much like me to achieve their aims. Your invaluable guideline denotes a lot to me and even further to my fellow workers. Many thanks; from each one of us.

  49. Definitely consider that that you said. Your favorite reason seemed to be at the net the simplest thing to bear in mind of. I say to you, I definitely get irked whilst people think about concerns that they plainly don’t understand about. You controlled to hit the nail upon the highest as well as defined out the whole thing without having side effect , other folks can take a signal. Will likely be back to get more. Thanks!

  50. A person essentially assist to make critically posts I’d state. That is the very first time I frequented your website page and up to now? I surprised with the research you made to make this particular publish incredible. Great task!

  51. It’s the best time to make some plans for the long run and it’s time to be happy. I’ve read this post and if I may just I desire to recommend you few interesting things or suggestions. Maybe you can write subsequent articles relating to this article. I wish to read more issues approximately it!|

  52. Woah! I’m really enjoying the template/theme of this site. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and visual appeal. I must say you have done a excellent job with this. Also, the blog loads very quick for me on Internet explorer. Outstanding Blog!|

  53. Howdy! This is my 1st comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading through your blog posts. Can you recommend any other blogs/websites/forums that go over the same subjects? Thanks a ton!|

  54. Hi there are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and set up my own. Do you require any
    html coding knowledge to make your own blog? Any help
    would be really appreciated!

  55. I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the internet will be a lot more useful than ever before.|

  56. Hi, I do believe this is a great website. I stumbledupon it 😉 I may return yet again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to guide others.|

  57. Hello there! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my apple iphone. I’m trying to find a theme or plugin that might be able to fix this problem. If you have any suggestions, please share. Cheers!|

  58. Hi, I do think this is an excellent site. I stumbledupon it 😉 I’m going to revisit once again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to help other people.|

  59. Hello, i believe that i noticed you visited my web site thus i came to go back the prefer?.I’m attempting to in finding issues to improve my web site!I assume its adequate to use some of your ideas!!|

  60. I am sure this piece of writing has touched all the internet visitors, its really really pleasant piece of writing on building up new website.|

  61. Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam feedback? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me insane so any support is very much appreciated.|

  62. Sweet blog! I found it while surfing around on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Cheers|

  63. It is the best time to make some plans for the future and it’s time to be happy. I have read this post and if I could I wish to suggest you some interesting things or advice. Perhaps you could write next articles referring to this article. I wish to read even more things about it!|

  64. Good day! I know this is kind of off topic but I was wondering which blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be great if you could point me in the direction of a good platform.|

  65. I’ve been exploring for a little bit for any high quality articles or weblog posts on this sort of house . Exploring in Yahoo I ultimately stumbled upon this website. Studying this info So i’m satisfied to exhibit that I have an incredibly just right uncanny feeling I discovered exactly what I needed. I so much without a doubt will make sure to do not fail to remember this website and provides it a look on a constant basis.|

  66. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how can we communicate?|

  67. Does your website have a contact page? I’m having trouble locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it expand over time.|

  68. Greetings from Ohio! I’m bored to tears at work so I decided to browse your site on my iphone during lunch break. I enjoy the information you provide here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyways, very good site!|

  69. Hi, I do believe this is an excellent website. I stumbledupon it 😉 I may come back yet again since i have book-marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.|

  70. Hey! Someone in my Facebook group shared this site with us so I came to give it a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Wonderful blog and brilliant style and design.|

  71. I must express my appreciation to the writer for bailing me out of this particular predicament. After searching through the the web and finding ideas which were not powerful, I figured my entire life was well over. Existing without the solutions to the difficulties you’ve sorted out by means of your review is a critical case, and ones which could have in a negative way affected my entire career if I had not noticed your web blog. Your main understanding and kindness in touching all the stuff was vital. I’m not sure what I would’ve done if I had not discovered such a solution like this. It’s possible to at this time relish my future. Thanks a lot so much for the professional and result oriented guide. I won’t think twice to suggest the website to any person who should have assistance about this subject matter.

  72. I get pleasure from, cause I discovered just what I was taking a look for. You’ve ended my four day long hunt! God Bless you man. Have a great day. Bye|

  73. You can certainly see your expertise within the article you write.
    The arena hopes for more passionate writers like you who aren’t afraid to say how
    they believe. All the time follow your heart.

  74. Thanks for your marvelous posting! I really enjoyed reading it,
    you’re a great author. I will be sure to
    bookmark your blog and may come back later on. I want to encourage you to ultimately continue your great job, have a nice weekend!

  75. I’m the manager of JustCBD company (justcbdstore.com) and I am currently planning to develop my wholesale side of business. I really hope that anybody at targetdomain give me some advice . I thought that the most effective way to do this would be to talk to vape stores and cbd retailers. I was hoping if anybody could suggest a reputable web-site where I can get CBD Shops Business Leads I am presently looking at creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. Not exactly sure which one would be the most suitable selection and would appreciate any advice on this. Or would it be simpler for me to scrape my own leads? Ideas?

  76. Superb blog! Do you have any tips and hints for aspiring writers? I’m hoping to start my own site soon but I’m a little lost on everything. Would you recommend starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely confused .. Any suggestions? Appreciate it!|

  77. Admiring the dedication you put into your blog and detailed information you present. It’s good to come across a blog every once in a while that isn’t the same out of date rehashed information. Excellent read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.|

  78. I am not sure where you’re getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for fantastic info I was looking for this information for my mission.|

  79. I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get got an shakiness over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this increase.|

  80. Hi, I do think this is a great web site. I stumbledupon it 😉
    I will revisit yet again since i have bookmarked it.
    Money and freedom is the greatest way to change, may you be
    rich and continue to guide other people.

  81. Does your site have a contact page? I’m having problems locating it but, I’d like to shoot you an e-mail. I’ve got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it grow over time.|

  82. As predicted all space coffins and space funeral homes will blow up in space around the year 2080 to year 3000 due to envy. That’s why we need the 777 immortality smart contracts to remind the living to have faith through time. The 777 immortality smart contract is the trust system that can save someone you love through time.

  83. It is perfect time to make some plans for the longer term and it is time to be happy. I’ve read this publish and if I could I want to recommend you some fascinating issues or suggestions. Perhaps you could write subsequent articles regarding this article. I want to read even more issues about it!|

  84. Pingback: Google

  85. Hi, I do think this is a great blog. I stumbledupon it 😉 I am going to come back once again since I saved as a favorite it. Money and freedom is the greatest way to change, may you be rich and continue to guide other people.|

  86. Everything is very open with a precise explanation of the challenges.

    It was truly informative. Your website is very helpful.
    Many thanks for sharing!

  87. I’ll immediately grab your rss feed as I can’t in finding your email subscription link or newsletter service. Do you’ve any? Kindly let me understand in order that I may just subscribe. Thanks.|

  88. Woah! I’m really loving the template/theme of this site. It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a fantastic job with this. Also, the blog loads extremely quick for me on Internet explorer. Outstanding Blog!|

  89. Attractive section of content. I just stumbled upon your website and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I’ll be subscribing to your augment and even I achievement you access consistently rapidly.|

  90. After I originally left a comment I seem to
    have clicked the -Notify me when new comments are
    added- checkbox and now whenever a comment is added I recieve
    four emails with the exact same comment. There has to be an easy method you are able to
    remove me from that service? Cheers!

  91. I was recommended this website by my cousin. I’m not sure whether
    this post is written by him as no one else know such detailed about my
    difficulty. You are amazing! Thanks!

  92. It is appropriate time to make some plans for the future and it’s time to be happy. I have read this post and if I could I want to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read even more things about it!|

  93. hi!,I like your writing so so much! proportion we communicate
    extra approximately your post on AOL? I require an expert
    in this space to unravel my problem. Maybe that’s you!
    Looking forward to look you.

  94. Howdy! I could have sworn I’ve been to this website before but after browsing through some of the post
    I realized it’s new to me. Nonetheless, I’m definitely glad I
    found it and I’ll be bookmarking and checking back often!

  95. Howdy, I believe your website may be having internet browser compatibility problems. When I look at your website in Safari, it looks fine however, when opening in IE, it’s got some overlapping issues. I merely wanted to provide you with a quick heads up! Aside from that, wonderful blog!

  96. Pingback: big black cock enter's rajapandi's tender asshole

  97. Hello, Neat post. There is a problem along with your website in internet explorer, would check this? IE nonetheless is the marketplace chief and a large component to other people will omit your fantastic writing because of this problem.|

  98. Hi, I do believe this is a great site. I stumbledupon it 😉 I’m going to revisit yet again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to guide others.

  99. You’ve made some really good points there. I looked on the internet for
    more info about the issue and found most individuals will go along with your views on this site.

  100. After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and from now on every time a comment is added I receive 4 emails with the same comment. Perhaps there is a means you can remove me from that service? Appreciate it!

  101. I’ve been browsing online more than 2 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the net will be a lot more useful than ever before.|

  102. Pingback: Handlateknik

  103. Pingback: كبرياء

  104. Oh my goodness! Awesome article dude! Thanks, However I am having difficulties with your RSS.

    I don’t know the reason why I can’t join it. Is there anybody else getting the same
    RSS issues? Anybody who knows the solution will you kindly respond?
    Thanks!!

  105. Pingback: حزن و الم

  106. Generally I do not learn article on blogs, but I would like to say that this write-up very forced me to take a look at and do it! Your writing style has been surprised me. Thanks, quite nice post.|

  107. Pingback: 5euros