WordPress is the most popular CMS on the internet. It’s built on PHP, so it makes sense that certain plugins are required to enhance its functionality and performance. WordPress may function incorrectly if certain PHP extensions are missing. A good example is when trying to add slashes at the end of a URL. In this case, you need to install an extension called “curl”.
Another important aspect is security. If you want to keep your website secure, always update WordPress and plugins included, have a look at your file permissions, check if all folders and files are writeable (especially the uploads folder), and last but not least: Make sure that all PHP extensions required by WordPress as listed below are installed on your server!
– curl – mcrypt – openssl – zip
Here is a list of required PHP extensions for WordPress:
Table of Contents
cURL library is used by WordPress when uploading media to the server via FTP or SFTP functions. Make sure you have at least PHP cURL version 7 installed.
MySQLi [MySQL Improved] [ MyISAM ] [InnoDB]
The MySQLi or MySQL improved extension provides additional functions to the MySQL database. This extension is required for WordPress’ core, especially when you are dealing with archives, pages, and even custom post types.
GD2 [PNG] [ JPEG ] [GIF]
WordPress uses the GD image library in order to scale images or create them if they do not exist already. It creates thumbnails of uploaded images and much more! It’s very important that this library is installed when using WordPress!
Enables you to request the current date and time from the server where your script is running. You can then use the DateTime module to format the date and time in several ways.
The DOM plugin
Allows you to edit and create XML documents via the DOM API on PHP. DOM requires that your PHP installation has LibXML installed.
WP natively supports the uploading of zipped files via the media uploader screen. ZIP support requires libzip (Zlib) to be installed on your server in order to function correctly. You must not disable this extension or you will lose zip file functionality within WP! Note: Because PHP’s default behavior is to disable safe mode” when an extension is enabled, you need to disable safe_mode in php.ini if it is on.
Iconv [Character Sets]
WordPress uses this library to transfer text using the appropriate encoding which makes internationalization possible. It is not required for WordPress but recommended for blog owners who plan on publishing in more than one language. Note: Changing this value from its default (UTF-8) may cause multi-language issues and/or problems with special characters like ä,ö,ü, etc.
Fileinfo [File Type Detection]
PHP’s bundled version of the Fileinfo extension delivers improved detection of file types based on their extension. It is bundled with PHP 5+ and it’s required by WordPress core to function properly!
PHP Data Objects (PDO) provides a uniform method to access databases in PHP. This library is not required for WordPress but is highly recommended if you are planning on executing SQL queries, installing or upgrading plugins/themes via WP-CLI, etc… Note: If you plan on using the MySQLi driver, then this extension should NOT be included because PDO comes built-in with that driver!
Enables you to create XML documents by writing directly into the document from your script. You can then output them directly or access them through DOM functions.
This library provides encryption functions, which are mainly used for hashing with WordPress’ new password encryption! It’s required by the new WordPress cryptographic functions, so it is highly recommended that you have this library. If not, then your passwords will be vulnerable to brute-forcing – an attack where hackers use automation to try thousands of password combinations per second.
If WordPress is crashing after you’ve changed something within your installation, then the problem might be that one of these extensions is missing or outdated! Try re-configuring them in php.ini – make sure to check each library’s version/compatibility using the list above as a reference before doing so. If you are having trouble installing WP locally, then make sure to create a localhost entry in your host’s file (c:\Windows\System32\drivers\etc\hosts) and point it towards your server’s IP address/name.