PHP module not found with lsphp8.3 and wordpress

In order to run wordpress well, other than the common php install, wordpress health will mention the optional modules intl, curl and imagick are not installed. curl relies on the system package curl though so make sure that is installed as well. I encountered this problem with a new install self installing openlitespeed and wordpress. I couldn’t find any solution online.

Initially i tried compiling php or adding the regular php install but neither worked. The best way to solve this is to not only install the optional modules from the package manager but also to install pear. php pear is a compatibility module for “legacy” modules. Even modifying php.ini will not solve the issue. The easiest way is to install the php pear module lsphp83-pear and reinstalling the optional php modules. It is not that wordpress hasn’t caught up to php 8 but php has changed the way of interacting with some useful but older modules. I highly recommend installing the optional modules and making sure they work for optimal wordpress performance.

For other php versions wordpress wont work with the common install due to mysqli module. Make sure pecl is also added when you install pear, it should be in the bin folder, default being /usr/local/lsws/lsphp[version]/bin . Both pear and pecl binaries can be used to add php modules you cant find or those that cant be detected or used with newer php versions, mostly due to compatibility with legacy php versions. When compiling php modules you will need a lot of space to install the much needed compilers and their libraries. For example you could use gcc and for the libraries, they will typically have the names like libghc-dev despite what the error says. the names lib and dev will be the packages you need to install. an error may say you need you need a library but the name of the library will have lib…-dev in when searching in the package manager.

In debian based linux distros, the package manager would be apt, so simply do apt search libghc-dev for example. the specific version doesnt matter, so go with the most recent one as it provides the needed source code as part as the compile. the binary libraries dont work. Using pear and pecl is important in situations where installing php modules with the package manager ends up not being detected.