» Home » uncategorized » WordPress PHP modules

WordPress PHP modules

WordPress 6.4 requires PHP version 7.4 or greater. Requirements

Versions prior to PHP 7.4 are not maintained by the PHP Community. Security support for PHP 7.4 ended in 06.11.2022 which means that even if there are security problems with it, official versions won’t be released.

Required PHP extensions

  • json (bundled in >=8.0.0) – Used for communications with other servers and processing data in JSON format.
  • nd_mysqli & its dependancy mysqlnd or mysqli (bundled in >=5.0.0) – Connects to MySQL for database interactions.

The PHP extensions listed below are highly recommended in order to allow WordPress to operate optimally and to maximise compatibility with many popular plugins and themes.

  • curl (PHP >= 7.3 requires libcurl >= 7.15.5; PHP >= 8.0 requires libcurl >= 7.29.0) – Performs remote request operations.
  • dom (requires libxml) – Used to validate Text Widget content and to automatically configure IIS7+.
  • exif (requires php-mbstring) – Works with metadata stored in images.
  • fileinfo (bundled in PHP) – Used to detect mimetype of file uploads.
  • hash (bundled in PHP >=5.1.2) – Used for hashing, including passwords and update packages.
  • igbinary – Increases performance as a drop in replacement for the standard PHP serializer.
  • imagick (requires ImageMagick >= 6.2.4) – Provides better image quality for media uploads. See WP_Image_Editor for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available.
  • intl (PHP >= 7.4.0 requires ICU >= 50.1) – Enable to perform locale-aware operations including but not limited to formatting, transliteration, encoding conversion, calendar operations, conformant collation, locating text boundaries and working with locale identifiers, timezones and graphemes.
  • mbstring – Used to properly handle UTF8 text.
  • openssl (PHP 7.1-8.0 requires OpenSSL >= 1.0.1 / < 3.0; PHP >= 8.1 requires OpenSSL >= 1.0.2 / < 4.0) – SSL-based connections to other hosts.
  • pcre (bundled in PHP >= 7.0 recommended PCRE 8.10) – Increases performance of pattern matching in code searches.
  • xml (requires libxml) – Used for XML parsing, such as from a third-party site.
  • zip (requires libzip >= 0.11; recommended libzip >= 1.6) – Used for decompressing Plugins, Themes, and WordPress update packages.

Caching Modules

The PHP extensions listed below are recommended to allow some WordPress cache (if necessary).
APCu, Memcached, and Redis are alternatives of which only one needs to be used.

  • apcu – In-memory key-value store for PHP (former APC stripped of opcode caching).
  • memcached (requires libmemcached >= 1.0.0) – memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
  • opcache – PHP can be configured to preload scripts into the opcache when the engine starts.
  • redis – PHP extension for interfacing with Redis.

List of the remaining PHP modules WordPress may use in certain situations or if other modules are unavailable. These are fallbacks or optional and not necessarily needed in an optimal environment, but installing them won’t hurt.

  • bc – For arbitrary precision mathematics, which supports numbers of any size and precision up to 2147483647 decimal digits.
  • filter – Used for securely filtering user input.
  • image (requires libgd >= 2.1.0; requires zlib >= 1.2.0.4; optional freetype2) – If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation.
  • iconv (requires libiconv/POSIX) – Used to convert between character sets.
  • shmop – Shmop is an easy to use set of functions that allows PHP to read, write, create and delete Unix shared memory segments.
  • simplexml (requires libxml) – Used for XML parsing.
  • sodium – (bundled in PHP >=7.2.0; requires libsodium >= 1.0.8) – Validates Signatures and provides securely random bytes.
  • xmlreader (requires libxml) – Used for XML parsing.
  • zlib (requires zlib >= 1.2.0.4) – Gzip compression and decompression.

These extensions are used for file changes, such as updates and plugin/theme installation, when files aren’t writeable on the server.

  • ssh2 (requires OpenSSL and libssh >= 1.2; recommended libssh >= 1.2.9) – Provide access to resources (shell, remote exec, tunneling, file transfer) on a remote machine using a secure cryptographic transport.
  • ftp – Implement client access to files servers speaking the File Transfer Protocol (FTP).
  • sockets – Implements a low-level interface to the socket communication functions based on the popular BSD sockets.

The priority of the transports are Direct file IO, SSH2, FTP PHP Extension, FTP implemented with Sockets, and FTP implemented through PHP alone.

Needed by specific Plugins

  • gd – required by NextGen Gallery to function correctly – GD is required for generating image thumbnails, resizing images, and generating watermarks

PHP Modules required for Invoice Ninja

  • bcmath – BCMath Arbitrary Precision Mathematics – for arbitrary precision mathematics, PHP offers Binary Calculator which supports numbers of any size and precision, represented as strings.
  • * ctype (Enabled in 8.1) – the functions provided by this extension check whether a character or string falls into a certain character class according to the current locale.
  • * curl (PHP >= 7.3 requires libcurl >= 7.15.5; PHP >= 8.0 requires libcurl >= 7.29.0) – Performs remote request operations.
  • * fileinfo – Used to detect mimetype of file uploads.
  • fpm (if using NGINX)
  • gd – GD is required for generating image thumbnails, resizing images, and generating watermarks
  • gmp – GNU Multiple Precision
  • * iconv (requires libiconv/POSIX) – Used to convert between character sets.
  • * json (bundled in >=8.0.0) – Used for communications with other servers and processing data in JSON format.
  • for earlier versions of Laravel mcrypt (required by Laravel) – this is an interface to the mcrypt library, which supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes.
  • * mbstring – Used to properly handle UTF8 text.
  • nd_mysqli & its dependancy mysqlnd or mysqli (bundled in >=5.0.0) – Connects to MySQL for database interactions.
  • * openssl (PHP 7.1-8.0 requires OpenSSL >= 1.0.1 / < 3.0; PHP >= 8.1 requires OpenSSL >= 1.0.2 / < 4.0) – SSL-based connections to other hosts.
  • PDO – the PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database–specific features as regular extension functions.
  • nd_pdo_mysql or pdo_mysql
  • * tokenizer (Enabled in 8.1) – the tokenizer functions provide an interface to the PHP tokenizer embedded in the Zend Engine. Using these functions you may write your own PHP source analyzing or modification tools without having to deal with the language specification at the lexical level.
  • * xml (requires libxml) – Used for XML parsing, such as from a third-party site.
  • * zip (requires libzip >= 0.11; recommended libzip >= 1.6) – Used for decompressing Plugins, Themes, and WordPress update packages.

* Should be enabled already if WordPress is installed

WordPress.com

https://wordpress.com/support/php-environment/

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.