Ubuntu creates two different versions of php.ini, one tied to Apache, and one for the command-line php program. Installing PHP on my 19.04 system created
Code:
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini
On older versions of Ubuntu "7.2" would be replaced with whatever PHP version you're running. These files are owned by the root user, so you will need to use sudo to edit them, e.g, "sudo nano /etc/php/7.2/apache2/php.ini".
For WordPress, you obviously need to modify the version in the apache2 directory.
The handy utility "locate" is your friend and installed by default. Typing "locate php.ini" will show you the locations of all files or directories with "php.ini" in their full paths.
Code:
$ locate php.ini
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini
/usr/lib/php/7.2/php.ini-development
/usr/lib/php/7.2/php.ini-production
/usr/lib/php/7.2/php.ini-production.cli
However the database for locate is only updated once each day. Files created since the last update will be missed. You can force an update with the command "sudo updatedb" before running locate to find more recent files.
Bookmarks