Edit php.ini nginx on Ubuntu 18.04 to increase max_input_vars

Hello, I need to increase the PHP Max. Input Vars and PHP Max. Input Time to install a theme in wordpress.

I’m using nginx on ubuntu 18.04 with easyengine commands. The php version is 7.2 and the path for php.ini is etc/php/7.2/cli/php.ini

In putty used sudo nano /etc/php/7.2/cli/php.ini and after change max_imput_vars and max_imput_time restarted nginx with sudo service nginx restart

Can someone help here? I’ve seen others with fpm instead of cli paths. I’m a noob and I’m stuck. Thanks.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Sorry, I’m not familiar with - it looks like it installs wordpress on a docker container on your droplet? If so, the container configuration files will be separate from your droplet’s configuration, eg, it can run nginx and php inside the container and the conf and ini files are also inside the container.

If you followed the video tutorial including the easyengine or ee steps then you will need to edit the php.ini file on the container.

An example of someone else trying to do the same can be found here on the easyengine support forum:

It’s a combination of docker commands and the normal commands you’d use to edit a text file.

Check those out and let us know if you need help progressing further! :)

So, when you run php on the commandline its only going to report back information about the cli version of PHP. The version that is used by the website is a different file and ini.

Let’s back up a moment… did you create a 1-Click Wordpress droplet via the DigitalOcean marketplace? Or did you create a LEMP droplet and then manually install Wordpress on there? I ask because the 1-click uses Apache, not Nginx so some instructions will be different.

If you did the 1-click or are not sure, please see if you have this file:


If you do have this file, make your changes and then restart apache2:

sudo service apache2 restart

If you do not have this file, try the following command - it will list all the directories and then you can copy / paste it here so we can see what is available:

Run this command:

ls -lah /etc/php/7.2

You should see something like this:

# ls -lah /etc/php/7.2/
total 20K
drwxr-xr-x 5 root root 4.0K Aug 16 13:50 .
drwxr-xr-x 3 root root 4.0K Aug 16 13:50 ..
drwxr-xr-x 3 root root 4.0K Aug 16 13:51 apache2
drwxr-xr-x 3 root root 4.0K Aug 16 13:51 cli
drwxr-xr-x 2 root root 4.0K Aug 16 13:51 mods-available

If you are not using apache2, please share the results of the ls command so we can see what other php.ini files might be in use.

Thanks and good luck!

You are close - as you mentioned, you are probably editing the wrong php.ini file. In this case, “cli” stands for “command line interface” so when you SSH into your droplet and run a php command, it will reference that .ini for its settings.

What you need is the .ini file that nginx is referencing. Do you have a /etc/php/7.2/fpm/php.ini file? If so, that’s likely the one you need to edit.

After editing it, you’ll probably only need to restart the php fpm service, not nginx (although it doesn’t hurt to do that too).

If you don’t have that file and cannot find the php.ini on the file system, you might be able to see it on a wordpress admin system information page (or plugin) or you could make your own temporary php script with phpinfo(); in it - that will display location of the current .ini file in use.

good luck and let us know how it is going

I was trying to do it manually to learn on the way. Will opt the 1-click install this time. :) Thanks for the help

Sometimes it is easier to start over … have you looked at the 1-Click WordPress option? When you create a droplet, you can select the “Marketplace” tab next to “Distributions” and “Container Distributions”.

That will install wordpress, php7.2 and apache2 - is there any specific reason you need the features of easyengine or nginx? If not, it might be worth starting with a good install. After you create the 1-Click droplet and SSH in the first time, it will walk you through setting it up.

More info here: