Hi, in the site health of my WordPress site, I got the information of " * Warning The optional module, intl, is not installed, or has been disabled."
When I search online, the solutions are mostly using command line.
However, I’m not familiar with command line.
Is it possible that I can install intl with built-in functionality of Virtualmin?
Thanks!
Nobody had mentioned that additional versions of php have been installed so you don’t need to add the version as it will be the correct module for the installed version of php
php-intl is a module that goes along with, or on top of, your base PHP.
if you did have several different php versions installed, such as 7.4 or 8.2, you then would need to install the specific php-intl module that matches those other versions …
on my RedHat systems, and using the REMI repos, it would be named something like php82-php-intl.
as others mentioned/hinted, if you have just one php version, and its the default and configured as your (initial/only) default, then the simpler/shorter name php-intl most likely will work.
again from my RedHat point of view, if your current base php is a tiny bit out of date, installing a new module such as php-intl may trigger other modules (and often the base) to require a minor update — like going from 8.1-2 to 8.1-3 – that is, if the currently available php-intl is 8.1-3, but your other modules are just -2, installing php-intl 8.1-3 may trigger, or require you to manually, an update of other modules to the same 8.1-3 level — aka what sudo apt update && sudo apt upgrade (I am guessing, again I am a RedHat guy) will do.
I didn’t mean that whole line.That from the Multiple PHP Versions docs, and IF you used that to install php8.1 you would use that format to install the intl, ie apt-get install php8.1-intl, if its the php that came with the OS use apt-get install php-intl
Sorry for the confusion.
You can add new PHP extensions for all installed PHP versions on the system by running the following command on Debian and derivatives:
for php in $(ls /etc/php); do sudo apt-get install -y "php$php-"{curl,intl}; done
For RHEL and derivatives you could use the following instead:
for php in $(scl list-collections 2>/dev/null | grep 'php' | sed 's/$/-php/') php; do for ext in curl intl; do sudo dnf -y install "${php}-${ext}"; done; done
A command above install curl and intl extensions for all PHP version that were installed on the system, similar to what Virtualmin is doing upon script installation. You can replace the names of the extensions with the ones you need to have installed.