How to Edit post_max_size in PHP Configuration

Hello
I am trying to use DevKinsta to import a WP that is not on Kinsta yet.
When I try to import the DataBase in Adminer, I have a message saying I should increase the Post_max_size in the configuration Php.
(it’s quite surprise given the database is only 30Mo…).

Nevertheless, I have NO IDEA where to look, and which line of code to change.
Could you please help? ( I’am not a developper, so don’t hesitate to detail each step).
Thanks!

Hi @AlexM . Welcome to DevKinsta!

We’re looking at increasing that value by default. In the meantime, it’ll need to be increased in the PHP configuration. I’m happy to help guide you on that! Just so I know the steps to provide, are you on Mac or Windows?

Hello @michael ,
thanks for your answer.
I am on Mac.

  1. Open Terminal on your Mac and type in docker exec -it devkinsta_fpm bash

  2. Type in apt-get update && apt-get upgrade && apt-get install nano. You will be prompted to type Y. This step will install nano so you can edit the file.

  3. Then type in nano /etc/php/7.3/fpm/php.ini. You may need to change the 7.3 to another version. Match this with the version the site is on on DevKinsta.

  4. There’s quite a bit here but what you’re looking for is post_max_size. To do a search, press control+w on your keyboard - type post_max_size - then enter.

  5. Change this to your desired value. post_max_size = 64M should do it. Exit with control+x and press Y to save.

  6. Type exit then docker restart devkinsta_fpm

Should be all good from there! Let me know if you have any questions about any steps here.

2 Likes

Hi @michael
Thanks for your reply.
It work.
Actually , I realized I was trying to upload my data base in .sql , and not compressed in sql.gz.
Once compressed it worked.
Thanks again!

1 Like

Hello,

Can you please instruct us on how to do this on a windows machine?

Thank you

Hi @cre8ivivision! The steps are the same except you’ll be using Windows Terminal.

Thank you. I have done exactly all the steps successfully for editing the php.ini file. I also rechecked the values in a php.ini file for confirmation which is reflecting the updated values. However, the values in WordPress are still reflecting the old ones. What should I need to do further to properly configured the php.ini so it could reflect the new values.

Be sure to also restart via docker restart devkinsta_fpm if you haven’t already. It should be reflected after that.

Yeah, I did it several times but some values are still the same whereas the other value such as PHP max input variables is reflecting properly. I have attached a screenshot and a container log file for your reference. Please have a look and indicate my errors.

Log.txt (13.4 KB)

@cre8ivivision - Is the site itself running with PHP 7.4? Additionally, do you happen to have memory limit value assigned on wp-config?

Hello everyone,
Is there a way to do some more php configuration?
for example having access onto the php.ini file?

Would appreciate :slight_smile:

Hi there @launesatans . Thanks for stopping by. We’ll have documentation on this shortly. Are you familiar with using shell? Try entering docker exec -it devkinsta_fpm bash then navigating to /etc/php/fpm/. You’ll find different versions there for the PHP version you need to configure.

Hi Michael, yes it works like charm, thank you a lot!

1 Like