Server configuration
PHP extensions for WordPress and WooCommerce
Build a PHP extension and runtime plan for Ubuntu that you can edit, including the time zone, PHP-FPM, OPcache and installation commands.
- PHP 8.1 to 8.5
- PHP-FPM and OPcache
- Ubuntu packages
Free, no sign-up. It runs in your browser, so nothing you type is sent to this site.
Nothing you enter leaves your browser.
This tool runs in your browser and needs JavaScript. Turn JavaScript on and reload the page.
PHP extensions
Your Ubuntu server
Choose Ubuntu 24.04 LTS or 26.04 LTS. The configuration and install commands follow this target.
Ubuntu package and module installation commands
Run the script without arguments to check candidates and simulate installation. Use --install to apply the selected repository and package setup on that Ubuntu server. Review the deployment guide before installing on an existing host.
How the server profile shares memory
The initial defaults use the 8 GiB profile. Your Ubuntu version and server preset are remembered across these generators; passwords and other configuration values are never saved in browser storage. Capacities are modelled in GiB (1024 MiB). Larger caches help when they hold useful data; more connections do not make an individual request faster. Compare uncached response time, PHP queueing, database reads, cache hit rates and peak RSS under representative traffic. These are sizing examples, not measured speed claims. Page caching remains opt in until invalidation and private-session exclusions are verified; order durability stays enabled.
Understand what each setting controls. Expand a recommendation for the reasoning and the official reference. Required features, recommendations and conditional integrations are identified separately. Only the Ubuntu version and server preset are remembered across generators. Other settings reset when the page reloads. 59 settings explained.
Checked 15 October 2026 against WordPress hosting guidance (opens in a new tab) and WooCommerce requirements (opens in a new tab). PHP 8.1 is retained for legacy planning. Use a currently supported, patched runtime for production.
Your PHP extension plan
Select the PHP version, review each feature, then copy or download your files.
- Target runtime
- Included capabilities
- Required by WordPress
- Built in for this version
Required features stay included. Recommended features are selected initially. Conditional features depend on your plugins. Unchecked features are omitted from the request; existing host modules are not removed.
Section 1 of 6
Choose your PHP runtime.
Start with the PHP branch and hosting environment. The extension plan follows your selected version.
A version choice describes the export. It does not switch PHP on your server.
Version and hosting
Controls: Selects extension packaging rules, lifecycle notes and the version checked by the diagnostics.
Recommendation PHP 8.4 as a production baseline
Use a supported branch with current security patches. PHP 8.5 needs testing against the exact WooCommerce extensions and themes in your store.
PHP supported versions (opens in a new tab)Controls: Records the Ubuntu target selected above for versioned APT installation commands.
Recommendation Use the method your host supports
Choose the Ubuntu archive or a verified matching Ubuntu repository above. Exported install commands check candidates before installation; the browser does not install packages.
Ubuntu package archive (opens in a new tab)Controls: Records whether deployment uses PHP-FPM or a provider-managed runtime. CLI must be checked separately.
Recommendation PHP-FPM for Nginx
The package plan includes the selected FPM package. It does not rewrite pools, switch Nginx sockets, enable Apache modules or reload services.
PHP INI directives (opens in a new tab)Application limits
PHP setting: memory_limit
Controls: Caps PHP-managed memory for one request; this is not a worker count or a total server memory limit.
Recommendation 512 MiB request ceiling for the 8 GiB profile; measure actual use
WooCommerce recommends a WordPress memory limit of at least 256 MB. Match wp-config.php limits and measured imports or image work; reserve capacity for concurrent workers.
WooCommerce server recommendations (opens in a new tab)PHP setting: upload_max_filesize
Controls: Limits an individual uploaded file before WordPress or plugin-specific limits.
Recommendation Size for legitimate media and imports
The web server and proxy may impose smaller limits. Large imports are better tested with a controlled job or CLI rather than unlimited web requests.
PHP INI directives (opens in a new tab)PHP setting: post_max_size
Controls: Limits the entire request body, including all files and form overhead.
Recommendation Keep above the upload limit
A POST limit equal to the largest file leaves no room for multipart overhead. Review web-server and application limits too.
PHP INI directives (opens in a new tab)PHP setting: max_execution_time
Controls: Sets PHP’s script execution timer; network and other wait time differ by operating system.
Recommendation 120 seconds as a starting limit
FPM request_terminate_timeout, Nginx timeouts and upstream proxies are separate. Diagnose slow jobs rather than making every request unlimited.
PHP INI directives (opens in a new tab)PHP setting: max_input_vars
Controls: Limits parsed GET, POST and cookie variables per input source.
Recommendation 5000 for larger store forms; verify the plugin’s need
Large menus, product forms and builders may need more. Verify a real submission and avoid raising this without a reason.
PHP INI directives (opens in a new tab)Controls: Sets display_errors Off, display_startup_errors Off and log_errors On.
Recommendation Log to the host’s private error destination
Configure log ownership, retention and access at the host. Debug privately on staging; do not expose server paths or customer data in storefront errors.
PHP INI directives (opens in a new tab)PHP-FPM worker capacity
Controls: Planning budget for this pool including shared OPcache; used to calculate worker capacity.
Recommendation 2048 MiB on the 8 GiB shared-server profile
Reserve MariaDB, Redis, the OS and other pools first. This is an estimate and does not enforce a process memory ceiling.
PHP-FPM configuration (opens in a new tab)Controls: Bounds the example worker count at four concurrent workers per available CPU.
Recommendation Use the real vCPU allocation
CPU-heavy requests can need fewer workers. Watch queue depth, CPU saturation and checkout tail latency.
PHP-FPM configuration (opens in a new tab)Controls: Estimated peak busy-worker RSS used to size pm.max_children.
Recommendation Replace 128 MiB with measured busy-worker use
The per-request memory limit is a ceiling, not typical RSS. Native allocations can exceed it. Measure loaded workers and reduce concurrency if RSS exceeds this assumption.
PHP-FPM configuration (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Section 2 of 6
The foundations your site uses.
Database access, secure connections, text handling and the features already included in PHP.
Required and built-in features stay in the checklist. Other selections can be adjusted to match your application.
Required and built-in
Controls: Encodes and decodes JSON used by REST APIs, settings and external services.
Recommendation Required by WordPress
Always enabled in PHP 8.1 to 8.5. Do not add extension=json or look for a separate PHP JSON package.
JSON PHP reference (opens in a new tab)Controls: Provides hashing functions used by application security and data integrity.
Recommendation Required by WordPress
Built in for these PHP versions. Verify hash functions exist; there is no separate loader line.
Hash PHP reference (opens in a new tab)Controls: Provides the regular-expression engine used throughout PHP and WordPress.
Recommendation Already part of PHP
Always available in these versions; no package or extension loader entry is generated.
PCRE PHP reference (opens in a new tab)Controls: Provides date objects, IANA timezone rules and timestamp conversions.
Recommendation Already part of PHP
Included with PHP. Update the runtime or its timezone database when civil-time rules change.
Date / timezone PHP reference (opens in a new tab)Controls: Connects WordPress to MySQL or MariaDB.
Recommendation Required by WordPress
Keep enabled. mysqlnd is an underlying driver and PDO MySQL is not a replacement for WordPress’s MySQLi interface.
MySQLi PHP reference (opens in a new tab)Requests, security and text
Controls: Makes HTTP requests for updates, APIs and store integrations.
Recommendation Included in the recommended plan
Prefer cURL with HTTPS and valid CA trust. WooCommerce can use fsockopen where available, but compatibility is usually better with cURL.
cURL PHP reference (opens in a new tab)Controls: Provides TLS streams and cryptographic capabilities used by outbound HTTPS.
Recommendation Included in the recommended plan
Verify both the extension and current trusted CA certificates. Do not disable certificate verification to fix HTTPS failures.
OpenSSL PHP reference (opens in a new tab)Controls: Processes multibyte text such as names, product descriptions and non-English content.
Recommendation Included in the recommended plan
Include for general compatibility; WooCommerce requires it for a non-English store.
Multibyte strings PHP reference (opens in a new tab)Controls: Adds ICU-backed locale formatting, transliteration and Unicode operations.
Recommendation Included in the recommended plan
Include for multilingual integrations. PHP 8.5 requires ICU 57.1 or newer; package managers should resolve matching libraries.
Internationalization PHP reference (opens in a new tab)Controls: Detects file MIME types from content during upload handling.
Recommendation Included in the recommended plan
Keep available for media and plugin upload checks; file extensions alone do not establish a file’s real type.
Fileinfo PHP reference (opens in a new tab)Controls: Offers input validation and filtering functions used by PHP libraries.
Recommendation Include when an integration needs it
Normally present in packaged builds. Still verify a custom runtime; these functions do not replace application-specific validation.
Filter PHP reference (opens in a new tab)Controls: Converts strings between character encodings.
Recommendation Include when an integration needs it
Retain for import and text-conversion fallbacks. This does not replace mbstring for multibyte operations.
Iconv PHP reference (opens in a new tab)Controls: Provides modern cryptographic primitives, including signature verification.
Recommendation Include when an integration needs it
Use a maintained libsodium build. WordPress may provide some fallbacks, but native support avoids relying on them.
Sodium PHP reference (opens in a new tab)Controls: Compresses and decompresses gzip-compatible data.
Recommendation Include when an integration needs it
Retain for application compression support. This does not turn on HTML output compression or replace web-server compression.
Zlib PHP reference (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Section 3 of 6
Give your media the right tools.
Image processing, metadata, archives and XML support for uploads, imports and integrations.
An installed image extension does not guarantee every codec is available. The checker reports actual build support.
Images and uploads
Controls: Processes images through ImageMagick and can render PDF previews with suitable delegates.
Recommendation Included in the recommended plan
Prefer Imagick with maintained ImageMagick libraries. PDF thumbnails need Ghostscript and an allowed ImageMagick policy; codecs depend on the build.
Imagick PHP reference (opens in a new tab)Controls: Provides an alternative image editor and fallback when Imagick cannot handle an image.
Recommendation Include when an integration needs it
Include alongside Imagick where practical. Check actual JPEG, PNG, WebP and AVIF support; installing GD does not enable every codec.
GD PHP reference (opens in a new tab)Controls: Reads camera metadata such as orientation from supported image uploads.
Recommendation Included in the recommended plan
Retain for image metadata handling. It does not provide an image-resizing engine.
EXIF PHP reference (opens in a new tab)XML and archives
Controls: Parses and modifies XML/HTML document trees for application code and integrations.
Recommendation Included in the recommended plan
Include with the XML module family. The packaged XML library should satisfy the selected PHP branch’s dependency versions.
DOM PHP reference (opens in a new tab)Controls: Provides event-based XML parsing for feeds and integrations.
Recommendation Included in the recommended plan
Keep with the XML family. Extension availability does not make untrusted XML safe; the consuming code must use safe parsing rules.
XML parser PHP reference (opens in a new tab)Controls: Reads XML into an object-oriented structure for feeds and imports.
Recommendation Include when an integration needs it
Retain for plugin compatibility. This is a separate module from XMLReader even when the OS bundles them together.
SimpleXML PHP reference (opens in a new tab)Controls: Streams XML documents without building an entire document tree in memory.
Recommendation Include when an integration needs it
Useful for import integrations. Actual import capacity still depends on application code, input size and request limits.
XMLReader PHP reference (opens in a new tab)Controls: Writes XML documents, for example in feed and export integrations.
Recommendation Include when an integration needs it
Include for integrations that produce XML. WordPress core sitemaps can work without this module.
XMLWriter PHP reference (opens in a new tab)Controls: Reads and writes ZIP archives for packages, backups and import/export tools.
Recommendation Included in the recommended plan
Include the maintained libzip-backed extension. Package extraction also depends on filesystem permissions and available disk space.
ZipArchive PHP reference (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Section 4 of 6
Match your store’s integrations.
Select conditional capabilities used by payment, shipping, import, backup and deployment tools.
SOAP and other integration modules depend on the plugins you use. Check each vendor’s requirements.
Store integrations
Controls: Adds decimal-string arithmetic for integrations that need arbitrary precision.
Recommendation Include when an integration needs it
A useful store compatibility option, not a universal WooCommerce requirement. The application must explicitly call it.
BCMath PHP reference (opens in a new tab)Controls: Adds SOAP clients and servers for compatible shipping, tax and other integrations.
Recommendation Include when an integration needs it
Enable if one of your WooCommerce extensions requires SOAP. It is not mandatory for every store.
SOAP PHP reference (opens in a new tab)Controls: Provides arbitrary-precision integer operations used by some cryptographic or payment libraries.
Recommendation Include when an integration needs it
Enable for a documented integration requirement. BCMath and GMP expose different APIs and are not automatic substitutes.
GMP PHP reference (opens in a new tab)Controls: Adds MySQL/MariaDB access through PDO for separate libraries or custom integrations.
Recommendation Include when an integration needs it
Use when a plugin or side application explicitly needs PDO. WordPress’s standard database driver remains MySQLi.
PDO MySQL PHP reference (opens in a new tab)Conditional site tools
Controls: Checks character classes used by PHP libraries and input parsers.
Recommendation Include when an integration needs it
Normally enabled by packaged PHP. Retain for dependency compatibility, even though WordPress does not list it as a core minimum.
Ctype PHP reference (opens in a new tab)Controls: Parses PHP source into tokens for tooling and some framework libraries.
Recommendation Include when an integration needs it
Keep when tools depend on it; enabling this does not permit arbitrary code execution by itself.
Tokenizer PHP reference (opens in a new tab)Controls: Provides native PHP sessions for plugins that explicitly use them.
Recommendation Include when an integration needs it
WooCommerce’s cart session system does not require native session_start. Avoid adding native session use to every storefront request.
Sessions PHP reference (opens in a new tab)Controls: Provides the FTP extension transport for installations that use WordPress filesystem credentials.
Recommendation Include when an integration needs it
Use only for your deployment workflow. Prefer a deliberate direct-file or secure transport setup; FTP plaintext is not a secure deployment default.
FTP PHP reference (opens in a new tab)Controls: Provides SSH-based functionality, including the optional WordPress SSH2 filesystem transport.
Recommendation Include when an integration needs it
Only needed for an integration or deployment workflow using it. It does not grant filesystem permissions or install an SSH server.
SSH2 PHP reference (opens in a new tab)Controls: Adds low-level socket APIs used by certain libraries and filesystem fallbacks.
Recommendation Include when an integration needs it
Not the same as fsockopen, which belongs to standard PHP streams. Add only when a dependency calls for this module.
Sockets PHP reference (opens in a new tab)Controls: Allows compatible local tools to work with shared memory segments.
Recommendation Include when an integration needs it
A WordPress-documented fallback capability, not a standard WooCommerce or Redis object-cache requirement.
Shared memory operations PHP reference (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Section 5 of 6
Prepare PHP for your cache.
Enable OPcache and choose one object-cache client only when the matching service and WordPress drop-in exist.
PHP OPcache and a WordPress object cache perform different jobs. Neither installs or configures a cache server here.
PHP bytecode cache
PHP setting: opcache.memory_consumption
Controls: Reserves shared bytecode-cache memory for this PHP service, rather than each request.
Recommendation 256 MiB shared OPcache for the 8 GiB profile
Many sites sharing one FPM service share this cache. Increase only when cache-full, restart or wasted-memory statistics justify it.
OPcache configuration (opens in a new tab)PHP setting: opcache.max_accelerated_files
Controls: Sets the requested upper bound for cached script keys. PHP rounds it to a supported hash-table size.
Recommendation 50,000 requested keys for a plugin-rich store
Check num_cached_keys, max_cached_keys and cache_full on the real web runtime. This does not cache HTML or database results. The file table takes about 48 bytes for each slot (PHP rounds the capacity up to its next table size) from the same shared memory as the interned strings buffer, so a very high capacity needs more shared memory or PHP-FPM will not start.
OPcache configuration (opens in a new tab)Controls: Caches compiled PHP bytecode between web requests.
Recommendation Included in the recommended plan
Keep enabled for the web runtime. PHP 8.5 always includes the module; PHP 8.1 to 8.4 may need its package and Zend loader. This INI avoids duplicate loader lines.
OPcache PHP reference (opens in a new tab)PHP setting: opcache.interned_strings_buffer
Controls: Shared storage for duplicate strings in cached bytecode.
Recommendation 32 MiB for the 8 GiB profile
Included in OPcache memory. Inspect interned string usage on the web runtime; reduce on a small host. It has to fit inside OPcache shared memory together with the file table (about 48 bytes for each script slot), or PHP-FPM will not start.
OPcache configuration (opens in a new tab)WordPress object cache
Controls: Includes the selected native client in the plan; a compatible server and WordPress object-cache drop-in are still required.
Recommendation One backend that matches your infrastructure
Choose PhpRedis for the Redis generator, Memcached for its service, or APCu only with a suitable local-cache integration. Predis is a PHP library and needs no PhpRedis extension.
WordPress hosting extension guidance (opens in a new tab)Controls: Provides the native PHP client for a compatible Redis object-cache integration.
Recommendation Use the matching object-cache backend
Selected automatically when the cache choice is PhpRedis. Install the server and WordPress drop-in separately.
PhpRedis PHP reference (opens in a new tab)Controls: Provides the native client for a compatible Memcached object-cache integration.
Recommendation Use the matching object-cache backend
Selected automatically for a Memcached backend. This is the memcached extension, not the different memcache extension.
Memcached PHP reference (opens in a new tab)Controls: Provides local shared user-data caching for an explicit application integration.
Recommendation Use the matching object-cache backend
Selected automatically for APCu. Cache scope follows the host/process topology; it is not a shared Redis replacement across servers.
APCu PHP reference (opens in a new tab)Controls: Adds an alternative binary serializer for clients that explicitly support it.
Recommendation Include when an integration needs it
Recommended by WordPress hosting guidance when useful to a supporting cache integration. Installing it does not replace PHP serialization globally; verify client build support and coordinate format changes.
Igbinary PHP reference (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Section 6 of 6
Keep the clocks in agreement.
Set PHP’s default timezone and record the named timezone used by your WordPress site or store.
WordPress sets PHP’s runtime clock to UTC. Configure the shop’s display timezone in WordPress Settings → General.
PHP and WordPress timezones
PHP setting: date.timezone
Controls: Writes date.timezone in the PHP INI for scripts that do not set their own timezone.
Recommendation UTC for a WordPress PHP service
WordPress bootstrap explicitly uses UTC. A custom default affects other PHP scripts; use a named IANA timezone and keep timezone data current.
PHP timezone configuration (opens in a new tab)Controls: Records the named timezone to set in WordPress Settings → General, used by WordPress-aware local date functions.
Recommendation Use your actual business location
Named zones handle daylight-saving rules. WordPress controls this setting in its database, not through a WP_TIMEZONE constant or PHP date.timezone. Existing schedules need review after a timezone change.
WordPress site timezone (opens in a new tab)Controls: Distinguishes PHP’s default clock from the site’s local display time.
Recommendation Keep PHP UTC; choose the site timezone separately
Use current_datetime(), wp_date() and wp_timezone() in application code. Do not change PHP’s global runtime timezone from a WordPress plugin.
WordPress bootstrap timezone (opens in a new tab)Controls: Overrides PHP’s timezone database with the PECL timezone data extension.
Recommendation Include when an integration needs it
Usually unnecessary when the PHP/system timezone data is current. Use only when your host needs this update mechanism.
Timezone database update PHP reference (opens in a new tab)No settings are available in this section with the current choices.
No matching settings in this section.
Your PHP extension and settings files
Version-specific extension plan, INI settings, installation guidance and diagnostics.
Ready for review. The INI contains application settings; extension loading stays with your host or package manager. The ZIP also includes a read-only CLI checker and separate WordPress timezone instructions.
Review this plan against your actual plugins, PHP build and hosting environment. Verify both CLI and the web runtime. Generating or downloading files does not install extensions or change your server.
Install, verify and deploy
- Select the PHP branch and hosting method. Review required features, the recommended plan and integration-specific additions.
- On Ubuntu, the script first checks versioned package candidates and simulates installation. An explicit
--installinvokes APT and adds the PHP PPA when you chose it; it does not copy INI files, switch web sockets or reload services. - For other systems or managed hosts, give the extension checklist to your provider. Avoid duplicate module loaders and use extensions matching the exact PHP build.
- Merge
99-wordpress.iniinto the host-approved configuration for the intended PHP service. Keep extensions and system directives out of.user.ini. Coordinate configuration validation and a supported reload. - Run
verify-php.phpwith the matching CLI interpreter outside the public web directory. The checker refuses web requests and performs no network or database operations. - Confirm the actual web runtime through WordPress Site Health and WooCommerce System Status. Test checkout, shipping, callbacks, refunds, uploads and scheduled jobs on staging.
Required, recommended, built in and conditional
WordPress lists JSON, hash and MySQLi as required. JSON and hash are already built in across PHP 8.1 to 8.5, as are PCRE and date/time support. MySQLi still needs to be available; PDO MySQL alone does not replace it.
The page includes WordPress's recommended extension families and its documented fallbacks and filesystem transports. It also includes conditional store tools. SOAP depends on your integrations; mbstring is needed for non-English WooCommerce stores.
Igbinary is useful only when an integration uses it. Redis, Memcached and APCu are backend choices; OPcache independently caches PHP bytecode. PHP 8.5 includes OPcache in the binary, so a separate loader is omitted.
Every third-party theme, payment, booking or shipping extension can add requirements. This plan does not certify arbitrary plugin compatibility. The verification script reports installed capabilities, not successful live payments or image rendering.
Timezone settings for WordPress and WooCommerce
PHP's date.timezone is the default for scripts that do not set their own timezone. UTC is recommended for a WordPress PHP service. WordPress itself sets the PHP runtime timezone to UTC during bootstrap.
Set your site's named timezone separately in Settings → General. WordPress-aware date APIs use that site setting. The exported timezone guide records both choices and includes an optional WP-CLI command for the correct site context.
Named IANA zones handle daylight saving. Changing the site timezone needs checks for scheduled sales, subscriptions, bookings and jobs; it does not change the OS clock or system cron timezone.
What you can do
-
PHP 8.1, 8.2, 8.3, 8.4 and 8.5
-
Extension planning for WordPress and WooCommerce
-
PHP time zone and runtime settings
-
PHP-FPM workers and OPcache settings
-
Ubuntu package commands and a command-line checker
How to use it
-
Choose PHP and Ubuntu
Choose the Ubuntu release, a PHP version and a package source that offers that version for your release.
-
Review the plan
Check the extension list, choose the time zone and size the PHP-FPM workers and OPcache within the shared server memory.
-
Install and check
Run the installation plan and the command-line checker on the server, then confirm the PHP-FPM service your site uses has the right modules and settings.
Plan PHP packages and runtime settings together
This free tool prepares the PHP extensions and runtime settings for WordPress and WooCommerce on Ubuntu 24.04 LTS and 26.04 LTS. It covers PHP 8.1 to 8.5, with required, recommended and optional extensions, the time zone setting and the commands for the package source you choose.
Know the limits
A PHP version being listed does not mean it is still supported or works with every plugin. Check PHP support dates, your WordPress and WooCommerce versions and what any paid extensions need before you choose a version. Packages depend on the repository you pick, and the PHP command line and PHP-FPM can load different settings. Nothing is installed by using this page.
Related tools
-
Nginx
Prepare routing, HTTPS and cache configuration.
-
MariaDB
Plan database memory and connection settings.
-
Redis
Prepare WordPress object cache configuration.
-
wp-config.php
Build database, security and WordPress settings.
Host WordPress on StackMattic
StackMattic sponsors these free tools. If you would rather not set up and look after the server yourself, StackMattic runs managed WordPress and server hosting.