I'm building a WordPress plugin intended for wide release, and would like to be able to rely on the openssl and gmp extensions, which require that PHP was compiled with those extensions specified and that they're enabled in php.ini. I know I can check if the extensions are loaded and throw an error if not, and I know that savvy users can manually enable an extension and non-savvy-but-motivated users could ask their web host to enable them, but I'd like maximum compatibility out of the gate.

I know it won't be 100% of hosts, but I'd be happy with 90% or even "yes most of them", but I can't find any way to get a sense of what extensions are commonly available. All I know is that my HostGator site and my Pantheon site both have openssl and gmp enabled, but that the default php7 install on arch linux has openssl but not gmp.

According to https://wordpress.stackexchange.com/a/42212/41534 and https://github.com/johnbillion/ext, openssl is required by WordPress only for PHPMailer, and gmp is not required, so it seems likely but not certain that hosts that support WordPress will enable openssl, but don't know about gmp. WordPress does require PHP version 7.3 or greater so I'm assuming that at least.

But beyond these two particular extensions it would be great to have some way to get a sense generically of what's commonly enabled, even though there won't be a perfect answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.