How to increase the maximum upload file size in Wordpress

My YunoHost server

Hardware: Old laptop or computer
YunoHost version: 4.0.8
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | (All are possible)
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I am trying yunohost to self-host a personal Wordpress blog that is currently hosted on
I am just starting with migrating and learning the little differences between and self-hosting.

One of the reasons for moving to yunohost and self-hosting was to avoid any space limitations.

I am trying to add a video to a blog post and I am getting the message in the Wordpress editor that the file is too large to upload.

I found some solutions to this problem in this post

The first solution I tried was to use the plugin “Increase Maximum Upload File Size”. This made a limitation of 50MB that was described as a limitation of my hosting service:
Maximum upload file size, set by your hosting provider: 50MB

My question: I am the hosting provider! :slight_smile:
How do I change this limit?

Hi @yfarkash,

I believe the limit is set in the nginx configuration that is deployed by the wordpress yunohost package. I think this is the line :

To change it, you can edit the generated configuration /etc/nginx/conf.d/ and reload nginx systemctl reload nginx. The downside of this approach (and why it is not recommended) is that on the next upgrades you either will loose that setting or the upgrade will have difficulties being done.

Two better approaches would be

  • to file an issue on to ask if that value could be made a variable that a user could set in the yunohost options.
  • to find some advice about adding a nginx configuration that superseeds that settings without being in the way of the coming upgrades.

Another way of looking at it is : it’s a sane default for a blog, and maybe it would be recommended to host your bigger files on the side, either by

Hope this helps

1 Like

Thank you, that helps a lot to understand the different techincal possibilities!

What you said in the end is true though: it is a sane default for a blog and for anyone who is modestly techincally able, uploading to Youtube or running a Peertube makes a lot more sense, which is what I was doing until now. (Youtube and embedding the video).

The issue came due to my very specific use: we use it for a small family blog and my wife is the kind of person who every extra step is a hinderence to her doing it. So, when she writes her posts she can’t be bothered re-sizing pictures and if she wants to insert videos I have to do the upload to youtube and embedding for her. I was hoping that by self-hosting she will be able to just insert however many pictures and videos when she is writing with complete disregard to space consideration.

Nevertheless, your reply is greatly appreciated and helps me understand the underlying setup much better!

You’re right, usability is key! I hope you find a good solution (I think changing the upload limit is a good one in this case).

Maybe it’s a good use case that can be described to the peertube project so that a wordpress plugin can be developped to seamlessly upload a video which is send to peertube and embeded in one step…

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.