[dropcap]P[/dropcap]HP is a programming language on which WordPress code is based. This language runs on the server and it is important to keep it up to date, both for security and functionality.
WordPress supports many versions of PHP, some even obsolete, but as a general rule you should use only those with security or stable support.
Officially the WordPress core supports from PHP 7.0 to PHP 7.4. However, not all themes or plugins are supported.
[tie_full_img]
[/tie_full_img]
[padding left=”5%” right=”5%”]
WordPress does work with PHP 5.6.20+. Versions prior to PHP 7.2 are not recommended because it doesn’t have support of any kind, and only use PHP 7.2.x if you have the latest version, since it only has security support..
WordPress supports many versions of PHP, some even obsolete
WordPress core makes use of PHP extensions. If the preferred extension is missing WordPress will either have to do more work to do the task the module helps with or, in the worst case, will remove functionality. Therefore the PHP extensions listed below are recommended.
- curl – Performs remote request operations.
- dom – Used to validate Text Widget content and to automatically configure IIS7+.
- exif – Works with metadata stored in images.
- fileinfo – Used to detect mimetype of file uploads.
- hash – Used for hashing, including passwords and update packages.
- json – Used for communications with other servers.
- mbstring – Used to properly handle UTF8 text.
- mysqli – Connects to MySQL for database interactions.
- sodium – Validates Signatures and provides securely random bytes.
- openssl – Permits SSL-based connections to other hosts.
- pcre – Increases performance of pattern matching in code searches.
- imagick – Provides better image quality for media uploads. See WP_Image_Editor is incoming! for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available.
- xml – Used for XML parsing, such as from a third-party site.
- zip – Used for decompressing Plugins, Themes, and WordPress update packages.
[/padding]
For the sake of completeness, below is a 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.
[padding left=”5%” right=”5%”]