I cant increase the post_max_size and upload_max_filesize

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: d896addf-324d-e59d-418f-0600a9d6323c
Description:
Even though I changed the post_max_size and upload_max_filesize in /opt/bitnami/php/etc/php.ini the server still shows the 80mib limit to upload[Maximum upload file size: 80 MB.]( I already visited the page https://docs.bitnami.com/aws/apps/wordpress/administration/increase-upload-limit-php/).
I already restarted everything through the sudo /opt/bitnami/ctlscript.sh restart command, also reboot and I have no clue what do I need to do.

I already tried the followings commands as root:
/opt/bitnami/ctlscript.sh restart php-fpm
/opt/bitnami/ctlscript.sh restart apache

My php.ini is already saved with:
post_max_size = 1000M
upload_max_filesize = 1000M

Although I don’t need this 1GB it’s just to test and I’m still getting “Maximum upload file size: 80 MB” on WordPress.

Hi @itjunior,

Thanks for using Bitnami. Can you try to set the values in the /opt/bitnami/apps/wordpress/conf/php-fpm/php-settings.conf file? You can define them as shown below

php_value[post_max_size]=1024M
php_value[upload_max_filesize]=1024M

After that, please restart Apache and PHP-FPM again.

sudo /opt/bitnami/ctlscript.sh restart php-fpm
sudo /opt/bitnami/ctlscript.sh restart apache
1 Like

Yes, this solution works. …but it took me hours searching to find this post. May I suggest that you add this instruction to your other documentation regarding Wordpress upload limits? This page, for example, is no longer correct: https://docs.bitnami.com/aws/apps/wordpress/administration/increase-upload-limit-php/

…and here: https://docs.bitnami.com/aws/how-to/migrate-wordpress/ . In fact, it would be helpful to publish a step-by-step guide to migrate a secure Wordpress site to a new instance, as it required from time-to-time. I do this every year or two and it always take a week of sorting through invalid help files to figure out the current process.

Hi @andrew.hetzel,

Thanks for your feedback. We will open a new task to our documentation team for them to update our website with the information present in this thread.

Regards,
Gonzalo

Hi @andrew.hetzel,

Can you provide us with more information about the WordPress migration feedback? Which step are you missing in our guide? Notice that guide is for moving the WordPress internal data.

Dear @gongomgra,

Thank you for your help, unfortunately, I remove the machine and deployed a fresh one, and this new one has the limit increased to 1GB already.

You can close this ticket and thank you for your help again.( Also please update the documentation about it)

Hi @gongomgra, I’m not sure what additional information you need. I transferred my Wordpress site from an old instance to a new one. When launching the new instance, it was set to a default max upload size of 80mb, yet my site has approximately 2gb of data. I followed the instructions for inceasing the upload limit on the relevant instruction page above, but it did not work. Your instructions in this discussion thread -did- work, so I suggested you add them to the page with incomplete information – and, add it as a resource to the Wordpress page about migration, since it’s something your users will possibly encounter, since most sites that have been running for a couple of years are likely larger than 80mb. Please let me know if any of this is unclear. Best, Andrew

Hi @andrew.hetzel,

Thanks for the feedback. I’ll notify our documentation team about it to improve the guide about how to increase those values.

Dear @gongomgra,

Just to let you know that I tried to deploy a new WordPress Bitnami machine and I performed:

On the /opt/bitnami/apps/wordpress/conf/php-fpm/php-settings.conf file the following changes

php_value[post_max_size]=1024M
php_value[upload_max_filesize]=1024M

After that, I just perform the following command as root to restart the servers:

sudo /opt/bitnami/ctlscript.sh restart

And everything works well!

(Just to report)The command:


    sudo /opt/bitnami/ctlscript.sh restart php-fpm
    sudo /opt/bitnami/ctlscript.sh restart apache

Is returning:

bash: /opt/bitnami/ctlscript: No such file or directory

You guys really need to update the documentation on:

https://docs.bitnami.com/aws/apps/wordpress/administration/increase-upload-limit-php/

EDITED: @gongomgra fixed the ctlscript.sh commands

Hi @itjunior,

Thanks for your message. I updated my message to reflect the correct commands. I’m glad you were able to fix your issue. We will close this thread as solved. Do not hesitate to open a new one with any other questions you may have.

Regards,
Gonzalo