<p>We have divided the tutorial into 2 parts.</p>
<p><img class="aligncenter size-full wp-image-1068" src="https://incrediblemag.com/wp-content/uploads/2018/12/2018-12-16_1457-e1544954247728.png" alt="" width="900" height="492" /></p>
<p>Here is a quick guide explaining on how to increase the default file upload limit (10MB) in WordPress sites which are installed via Moss.sh service.</p>
<h2>Part 1:</h2>
<p>1# Log into your server as user <strong>moss</strong></p>
<p><code>ssh moss@yourserverip</code></p>
<p>2# Run <code>sudo su</code></p>
<p><img class="aligncenter size-full wp-image-1067" src="https://incrediblemag.com/wp-content/uploads/2018/12/2018-12-16_1502-e1544954257818.png" alt="" width="600" height="382" /></p>
<p>3# Run <code>cd /etc/openresty/<br />
ls</code> and then press Return. Now you will be presented with files listed in the DIR. You will be able to see a file name mentioned server_params.username</p>
<p><img class="aligncenter size-full wp-image-1066" src="https://incrediblemag.com/wp-content/uploads/2018/12/2018-12-16_1507-e1544954264146.png" alt="" width="600" height="206" /></p>
<p>4# Run<br />
<code><br />
cat server_params.inspirefusion<br />
</code></p>
<p>Replace inspirefusion with your username. You should be able to see something like below:</p>
<p><img class="aligncenter size-full wp-image-1065" src="https://incrediblemag.com/wp-content/uploads/2018/12/2018-12-16_1511-e1544954271230.png" alt="" width="700" height="408" /></p>
<p>5# Run<br />
<code><br />
cat server_params.inspirefusion<br />
</code></p>
<p>Replace inspirefusion with your username. Then you&#8217;ll be prompted for more input. Copy &; paste below text if you want to increase your file upload limit to 25MB:</p>
<p><code># Extra nginx params to be included in this site managed by Moss<br />
# all directives below will be included within 'server' blocks<br />
# common configs that you might want to fine-tune are given</code></p>
<p># Core module<br />
# https://nginx.org/en/docs/http/ngx_http_core_module.html<br />
#</p>
<p>client_max_body_size 25m;</p>
<p># Gzip module<br />
# https://nginx.org/en/docs/http/ngx_http_gzip_module.html<br />
#<br />
gzip on;<br />
gzip_disable &#8220;msie6&#8221;;<br />
gzip_comp_level 5;<br />
gzip_min_length 256;<br />
gzip_types application/javascript application/rss+xml application/x-javascript application/xhtml+xml application/xml text/css text/javascript text/plain text/xml;<br />
EOF</p>
<p>Press Return</p>
<p>6# Check if the config file is as it should be:<br />
<code>cat server_params.inspirefusion</code><br />
Replace inspirefusion with your username.</p>
<p>7# <code>exit</code></p>
<h2>Part 2:</h2>
<p>1# sudo su</p>
<p>2# cat <;<;EOF >;>; /etc/php/7.2/fpm/conf.d/99-extra.ini<code></code><br />
You will be prompted for more input:</p>
<p>3# <code>upload_max_filesize = 25M<br />
post_max_size = 25M</code></p>
<p>EOF</p>
<p>4# Verify changes:<br />
<code>cat /etc/php/7.2/fpm/conf.d/99-extra.ini</code></p>
<p>5# Goto your moss.sh account and visit the sites section and select the site for which you just mades the above changes. Click &#8220;reprovision&#8221;</p>
<p> ;</p>
<p> ;</p>

How to Increase WordPress File Upload Limit in Moss.sh
