By pinheiropt
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
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:
/etc/php/7.2/apache2/php.ini
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!
Sorry, I’m not familiar with easyengine.io - 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:
https://community.easyengine.io/t/unable-to-edit-php-ini-file/11543
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! :)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.