PHP Extensions for WordPress 6

The selections of the cPanel PHP Extensions shown here is for a WordPress 6 installation, using PHP 8.1. The selections may change depending on the requirements for features, plugins, and other software installed on the same cPanel server.

The version of WordPress isn’t necessarily a required version for these extensions. The title is WordPress 6 but the details is more or less applicable to any version of WordPress 6.x, even though at the time of publishing this article, WordPress 6.6 is the current version. The needs of which PHP extensions to enable or disable is generally stable across multiple versions.

Before each extension name is a symbol to indicate if it should be selected or not:

  • ☐ means the extension is not selected
  • ☑ means the extension is selected
  • ✓ means the extension is pre-selected and cannot be changed

PHP Extensions

A

☐ amqp

☐ apcu

B

☑ bcmath

☐ brotli

✓ bz2

C

✓ calendar

✓ core

✓ ctype

✓ curl

D

✓ date

☐ dba

☐ dbase

☑ dom

E

☐ eio

☑ enchant

✓ exif

F

☐ ffi

☑ fileinfo

✓ filter

✓ ftp

G

☑ gd

☐ gearman

☐ geoip

☐ geos

✓ gettext

☐ gmagick

☐ gmp

☐ gnupg

☐ grpc

H

✓ hash

I

✓ iconv

☐ igbinary

☑ imagick

☑ imap

☐ inotify

☑ intl

☑ ioncube_loader

J

☐ jsmin

✓ json

L

☐ ldap

✓ libxml

☐ luasandbox

☐ lzf

M

☐ mailparse

☑ mbstring

☐ mcrypt

☐ memcache

☐ memcached

☑ monarxprotect

☐ mongodb

☐ msgpack

☐ mysqli

☑ mysqlnd

N

☑ nd_mysqli

☑ nd_pdo_mysql

☐ newrelic

O

☐ oauth

☐ oci8

☐ odbc

☑ opcache

✓ openssl

P

✓ pcntl

✓ pcre

☐ pdf

☑ pdo

☐ pdo_dblib

☐ pdo_firebird

☐ pdo_mysql

☐ pdo_oci

☐ pdo_odbc

☐ pdo_pgsql

☑ pdo_sqlite

☐ pdo_sqlsrv

☐ pgsql

☐ phalcon5

☑ phar

☑ posix

☑ pspell

☐ psr

R

☐ raphf

☐ rar

✓ readline

☐ redis

✓ reflection

☐ rrd

S

☐ scoutapm

✓ session

✓ shmop

✓ simplexml

☐ snmp

☑ soap

☑ sockets

☐ sodium

☐ solr

☐ sourceguardian

✓ spl

✓ sqlite3

☐ sqlsrv

☐ ssh2

✓ standard

☐ swoole

☑ sysvmsg

☑ sysvsem

☑ sysvshm

T

☐ tideways_xhprof

☐ tidy

☐ timezonedb

✓ tokenizer

☐ trader

U

☐ uploadprogress

☐ uuid

V

☐ vips

X

☐ xdebug

✓ xml

☑ xmlreader

☐ xmlrpc

☑ xmlwriter

☑ xsl

Y

☐ yaf

☐ yaml

☐ yaz

Z

☑ zip

✓ zlib

☐ zmq

Similar Extensions

Some extensions are similar, providing the same type of features in a different way. They may be incompatible with each other and can’t be selected together so it doesn’t cause conflicts, but the features may be different enough to cause problems.

mysql or nd_mysql

The need to differentiate between these extensions came about when the WordPress Site Health feature was stating “utf8mb4 requires a newer client library”. The details mentions the MariaDB version supports utf8mb4, and WordPress’ utf8mb4 support requires MySQL client library (libmysql) version 5.5.3 or newer. There is no PHP extension ‘libmysql’, instead it is served by a set of three extensions:

  • ☐ mysql
  • ☐ mysqli
  • ☐ pdo_mysql

Unselect these extensions and instead, select these PHP extensions:

  • ☑ mysqlnd
  • ☑ nd_mysqli
  • ☑ nd_pdo_mysql

The ‘nd’ means Native Driver and is distributed as part of PHP. It replaces the older non-nd extensions, so newer character sets such as utf8mb4, is not supported.

gmagick or imagick

Use the imagick extension instead of the gmagick extension.

gmagick is a fork in 2002 from the ImageMagick library (imagick). While both have the basic features to support image manipulation in WordPress, I found gmagick didn’t support .webp files. imagick is the more widely used library and from my experience, is more up-to-date with more active contributors.

gmagick was updated in March 2024, but I haven’t checked if it has added support for .webp files. I had read that gmagick has faster performance, but the image manipulation needs of WordPress is generally quite minor and you won’t notice any meaningful difference.