PHP Extensions for WordPress: Required vs Recommended

Author: Lucky Oleg | Published Updated

WordPress requires json, hash and mysqli. Recommended modules add image processing, remote requests, archive handling and other capabilities. A hosting panel’s full list includes options your site may never use.

The tables below separate core requirements from recommendations and feature-specific choices. They follow the WordPress Hosting Handbook, checked on 2 October 2026. The host screenshot is an example of the interface, not a tested configuration for every WordPress site.

Required and built-in PHP extensions

ExtensionCategoryPurposeWhat to check
jsonRequiredJSON dataBuilt into PHP 8.0+; no optional checkbox needed
hashRequiredHashingBuilt into PHP 7.4+
mysqliRequiredWordPress database connectionMust load in the website’s PHP runtime
pcreBuilt-inRegular expressionsNormally no hosting action
mysqlndDriverSupports database extensionsDoes not replace mysqli

PHP’s manuals confirm the built-in status of JSON and hash. The MySQL native driver documentation explains the driver layer.

A host may label its MySQLi package nd_mysqli. Confirm that it provides mysqli; do not select conflicting packages just because their names look related. pdo_mysql is a separate database API. Enable it when a plugin or custom application needs it, not as a replacement for WordPress’s mysqli connection.

ModulePurposeConfiguration note
curlRemote requestsCheck outbound connections
dom, xmlXML/document processingHost packages may group these
exif, fileinfoImage metadata and file typesCheck uploads
imagickImage processingNeeds ImageMagick
intl, mbstringInternational textCheck multilingual features
opensslEncrypted outbound connectionsDistinct from the site’s HTTPS certificate
zipArchive handlingCheck updates and exports
igbinarySerializationConfirm support in the consuming cache/application

Treat this as a review list. A module can already be enabled without appearing as a selectable option. Ask the host to verify availability for the exact domain and PHP version, then test the feature that depends on it.

Optional, fallback and plugin-specific choices

ModuleCategoryWhen to consider it
gdImage fallbackImage handling when Imagick is unavailable
opcacheBytecode cacheHost-managed caching of compiled PHP
redis, memcached, apcuObject cachingOnly with a matching cache setup
simplexml, xmlreader, sodium, zlibFeature/fallbackMatch application dependencies
pdo_mysql, soap, bcmath, imapPlugin-specificOnly when a component requires them

Check the relevant module and plugin documentation before enabling optional dependencies. For example, OPcache caches compiled PHP code, while a Redis client connects code to Redis. An extension checkbox alone does not configure persistent object caching in WordPress.

Avoid enabling every extension as a precaution. Keep a record of why each optional module is present, so the same feature can be checked when changing PHP branches.

Which PHP version should these modules run on?

Use the recommended PHP version guide to choose a branch. For WordPress 6.9 or later, PHP 8.5 is a candidate after the host, plugins, theme, extensions and critical flows pass staging. PHP 8.4 is another supported option when a dependency blocks 8.5.

PHP 8.4 receives active support until 31 December 2026 and security fixes until 31 December 2028, according to php.net.

Recheck extensions whenever you change branches: a host can enable different modules for each version. PHP 8.2 reaches end of life on 31 December 2026; follow the PHP 8.2 upgrade plan if it is still your production version.

Example: a hosting panel’s PHP 8.5 selector

Example PHP 8.5 hosting selector with extension checkboxes and host-specific nd_mysqli naming

Host interface example, not a universal checklist. The selected optional modules reflect that environment. Use the tables above and your plugin requirements to decide what your site needs. A built-in module may have no checkbox, and your host may use different names.

Check and enable modules for the correct runtime

  1. In WordPress, open Tools → Site Health. Read the Status warnings, then use Info → Server to confirm the web PHP version. Site Health checks important modules but is not an inventory of every dependency a plugin can have.
  2. In the hosting panel, select the exact domain. Confirm its PHP version and handler before changing modules.
  3. If your host provides Select PHP Version, open its extension settings and enable the needed module. This selector is not present on every cPanel account. Other hosts install modules through managed packages or support requests.
  4. Apply the host’s required reload or restart procedure. On managed hosting, ask support to do this.
  5. Recheck Site Health and exercise the affected operation, such as uploading an image, installing an update or submitting a form.

If you have shell access, php -v, php -m and php --ini report the command-line version, modules and configuration. They do not prove that PHP-FPM or another web handler uses the same configuration. Ask the host to compare them when a CLI job succeeds but the website fails.

Avoid leaving a public phpinfo() page online. It exposes server configuration. Prefer the host’s authenticated diagnostics; remove any temporary diagnostic file after use.

Fix missing JSON, MySQLi and other extension errors

Read the exact message first. Similar symptoms can come from different layers.

The exact messages WordPress shows

WordPress core checks for its required extensions itself. These are the messages it prints, quoted from the current WordPress source code (checked 17 October 2026). The version number changes with your WordPress release.

“WordPress 7.0 requires the json PHP extension.”

The site stops before it loads, from the requirements check in wp-includes/load.php. WordPress lists json and hash as required in wp-includes/version.php. JSON is always enabled on PHP 8.0 and later, and hash on PHP 7.4 and later, so this message means the domain still runs PHP 7.x. The quick repair is to tick json for PHP 7.4 in the host’s PHP extensions panel. The better fix is to move the domain to PHP 8.3 or later, where the message cannot appear.

“The update cannot be installed because WordPress 7.1 requires the json PHP extension.”

The same check runs in the updater, wp-admin/includes/update-core.php, before any file is replaced. The site keeps running its current version and simply cannot update. The fix is the same: enable json on PHP 7.4 or, better, move to PHP 8.3 or later, then run the update again.

“Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

This also comes from wp-includes/load.php. WordPress shows it when the mysqli functions are missing and no database drop-in is installed, and adds “Please check that the mysqli PHP extension is installed and enabled.” Enable the host’s MySQLi package for that domain and PHP version; mysqlnd alone does not provide it.

Other symptoms and where to look:

Message or symptomWhat to verifyNext action
Missing json, or undefined json_encode()Actual web runtime and the component reporting the errorJSON is built in on PHP 8; ask the host to investigate a runtime mismatch or inaccurate diagnostic
Missing MySQL extension, or undefined mysqli_connect()mysqli availability for this domainEnable the host’s matching MySQLi package; mysqlnd alone is insufficient
Error establishing a database connectionCredentials, database service, permissions and network accessDiagnose the database connection; this message alone does not identify a missing module
Undefined curl_init() or ZipArchive missingcurl or zip in the web handlerAsk the host to enable the named module for this PHP version
“The response is not a valid JSON response” in the editorREST request status and response bodyCheck redirects, authentication, server errors and security rules before blaming PHP’s JSON module

For a reported JSON problem:

  1. Note where it appears: Site Health, the editor, a plugin or the server log. Record the failing action and time.
  2. Confirm the PHP version serving that domain. On PHP 8+, searching for a JSON checkbox is not a fix because the extension is always enabled.
  3. If an editor request fails, inspect that request in the browser Network panel. An HTML login page, error page or warning printed before the JSON is a response problem, even when PHP supports JSON correctly.
  4. On staging, review the PHP error log and isolate the plugin, theme or server rule involved. Keep debug output out of public responses.
  5. Give the host the domain, web PHP version, handler and error timestamp. Repeat the failed action after the repair.

After enabling a module, verify the feature rather than stopping at a green checkbox. For stores, include sandbox checkout, payment callbacks, order emails and scheduled tasks. For page builders, use the Elementor requirements and test plan.

If a missing module or legacy plugin blocks an upgrade, our WordPress support service can assess the configuration and agree a scoped repair.

Recommended tools

Recommended tools for this guide

Use these free tools to apply the ideas from this guide to your own website.

Useful info? Spread the Aloha:

Lucky Oleg

Lucky Oleg is the founder of Web Aloha, a web design & SEO agency helping businesses ride the digital wave. With years of experience in WordPress, technical SEO, and web performance, he writes about what actually works in the real world.