WordPress needs PHP extensions to generate page content, update core and plugins and also for handling of file and image uploads. In this post, we have compiled a complete list of required PHP extensions for operating WordPress on a linux server.
Critical PHP Extensions
Critical PHP extensions are a must for full performance of your WordPress installation. A missing extension may decrease performance of your WordPress installation drastically and it can even cause your server to crash on high-volume user requests. Make sure that all extensions marked with external or PECL are enabled on your server.
- curl (external*) – cURL is a library that lets you make HTTP requests in PHP. Performs remote request operations.
- dom (external*) – The DOM extension allows you to operate on XML documents through the DOM API with PHP. Used to validate html content.
- exif (bundled) – Exif PHP extension enables you to work with metadata from images taken by digital devices. Works with metadata stored in images.
- fileinfo (bundled) – Tries to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions. Used to detect mimetype of file uploads.
- hash (core) – Allows direct or incremental processing of arbitrary length messages using a variety of hashing algorithms. Used for hashing, including passwords and update packages.
- mbstring (bundled) – Mbstring is an extension of php used to manage non-ASCII strings. Used to properly handle UTF8 text.
- mysqli (external*) – The MySQLi Extension is a relational database driver used in the PHP scripting language to provide an interface with MySQL databases. Connects to MySQL for database interactions.
- sodium (external*) – Sodium, is a powerful cryptography library. Validates Signatures and provides securely random bytes.
- openssl (external*) – Permits SSL-based connections to other hosts.
- pcre (bundled) – The PCRE library is a set of functions that implement regular expression pattern matching. Increases performance of pattern matching in code searches.
- imagick (PECL*) – Provides better image quality for media uploads.
- xml (external*) – Used for XML parsing, such as from a third-party site.
- zip (external*) – Used for decompressing Plugins, Themes, and WordPress update packages.
- filter (core) – Filters data by either validating or sanitizing it. Used for securely filtering user input.
- gd (bundled) – Used to create and manipulate image files in a variety of different image formats. If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation.
- iconv (bundled) – Contains an interface to iconv character set conversion facility with various utility functions that help you to write multilingual scripts. Used to convert between character sets.
- mcrypt (external*) – Generates random bytes when libsodium and /dev/urandom aren’t available.
- simplexml (external*) – Used for XML parsing.
- xmlreader (external*) – Used for XML parsing.
- zlib (bundled) – Gzip compression and decompression.
(*) Please note, if your hosting provider is not a dedicated WordPress hosting company, libraries with asterisk may be missing on your PHP installation. Especially imagick is a critical extension and we recommend enabling it on your server.