- Home
- Site
- Configurations
- Change PHP Version in FlyWP Site
Change PHP Version in FlyWP Site
This guide explains how to update the PHP version and configure PHP settings for a site in FlyWP.
Accessing PHP Settings
Section titled “Accessing PHP Settings”-
Log in to your FlyWP dashboard.
-
Go to Sites and select the target site.
-
In the left sidebar under Configurations, click PHP.

Available PHP Versions & Changing Versions
Section titled “Available PHP Versions & Changing Versions”The available PHP versions depend on your site's web server:
- Nginx sites: PHP 7.4, and 8.0 through 8.5 (7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5).
- OpenLiteSpeed (OLS) sites: PHP 7.4, and 8.1 through 8.4 (7.4, 8.1, 8.2, 8.3, 8.4).
To switch versions:
-
Locate the PHP Version dropdown.

-
Select your desired version.
-
Click Save Changes.
FlyWP will automatically reconfigure PHP-FPM for the selected version.
Additional PHP Configuration Settings
Section titled “Additional PHP Configuration Settings”The PHP configuration page also allows you to tune performance and runtime values directly from the dashboard:
- Memory Limit: Maximum memory allocated to each PHP script (e.g., 256M, 512M).
- Max Execution Time: Maximum duration in seconds a script is allowed to execute.
- Max File Upload: Maximum number of files that can be uploaded at once.
- Max File Upload Size: Maximum size of a single uploaded file (
upload_max_filesize). - Max Input Time & Max Input Vars: Maximum time spent parsing request data and maximum number of input variables accepted.
- Process Manager: Configure PHP-FPM pool settings (process manager mode, max children, start servers, and spare servers).
- OPCache & JIT (Nginx sites only): Enable or disable PHP OPCache for pre-compiled script caching, and the JIT (Just-In-Time) compiler. JIT is shown on PHP 8.0 or newer, including 8.3, 8.4 and 8.5, and needs OPCache on. New sites start with JIT off; a site with no saved JIT value shows it on. If the site returns 502 errors after you turn JIT on, turn it off and save.
Click Save Changes to apply your adjustments.
Need a setting the dashboard does not offer? See Advanced: Edit PHP Configuration Without the Dashboard.
Outdated PHP Versions
Section titled “Outdated PHP Versions”PHP 7.4, 8.0 and 8.1 are end-of-life (EOL). They no longer get security fixes. FlyWP labels them Outdated & Vulnerable - EOL wherever you pick a PHP version:
- Create Site: the PHP Version list shows the label, and a security warning appears under the list.
- PHP Settings: the same label, and a Security Warning notice under the PHP Version field.
- Sites list: a warning icon next to the PHP version. Hover over the icon to read the message.
- Site Overview: a Security Warning banner, with a Change PHP version link if you can update the site.
You can still choose an EOL version. FlyWP shows the warning, but it does not change the PHP version of your site. Static HTML and Node.js sites do not show this warning.
Upgrade Advice
Section titled “Upgrade Advice”- Move the site to PHP 8.3 or newer. PHP 8.2 reaches end of life on December 31, 2026.
- Check that your plugins and themes support the new version first.
- Make the change on a staging clone, test it, and then apply it to production (see Recommended Workflow).
Advanced: Edit PHP Configuration Without the Dashboard
Section titled “Advanced: Edit PHP Configuration Without the Dashboard”This section is for advanced users with SSH access who want to change PHP settings the dashboard does not cover. For most sites, the PHP page is all you need.
Where PHP Settings Are Stored
Section titled “Where PHP Settings Are Stored”When you click Save Changes on the PHP page, FlyWP writes your settings into files in /home/fly/<domain>/config/php/ on your server (replace <domain> with your site's domain). Which files are used depends on the site's web server stack.
Nginx Sites
Section titled “Nginx Sites”The PHP container loads these files. The .ini files are mounted into /usr/local/etc/php/conf.d/, and zz-docker.conf into /usr/local/etc/php-fpm.d/ as the PHP-FPM pool file.
| File | Settings | Dashboard field |
|---|---|---|
memory.ini | memory_limit | PHP Memory Limit |
uploads.ini | upload_max_filesize, post_max_size, max_file_uploads | Max File Upload Size, Max File Upload |
variables.ini | max_execution_time, max_input_time, max_input_vars | Max Execution Time, Max Input Time, Max Input Vars |
opcache.ini | opcache.enable, opcache.jit_buffer_size | Enable PHP OPCache, Enable JIT Compiler |
zz-docker.conf | PHP-FPM pool (pm, pm.max_children, pm.start_servers, and related) | Process Manager Type and the fields under it |
custom.ini | Empty by default, not set by the dashboard | None |
Saving also updates the site's Nginx limits in /home/fly/<domain>/config/nginx/common/limits.conf:
client_max_body_sizeis set to Max File Upload Size.client_body_timeout,send_timeoutandfastcgi_read_timeoutare set to Max Execution Time.
OpenLiteSpeed Sites
Section titled “OpenLiteSpeed Sites”OpenLiteSpeed sites use a single file, ols.ini. It is mounted into the OpenLiteSpeed container at /usr/local/lsws/lsphp<version>/etc/php/<version>/mods-available/ols.ini, for example lsphp83/etc/php/8.3/ for PHP 8.3.
| File | Settings | Dashboard field |
|---|---|---|
ols.ini | memory_limit, upload_max_filesize, post_max_size, max_file_uploads, max_execution_time, max_input_time, max_input_vars | PHP Memory Limit, Max File Upload Size, Max File Upload, Max Execution Time, Max Input Time, Max Input Vars |
- The other files in
config/php/(memory.ini,uploads.ini,variables.ini,opcache.ini,zz-docker.confandcustom.ini) are present but not mounted, so editing them has no effect on an OpenLiteSpeed site. - The dashboard does not show Process Manager Type, Enable PHP OPCache or Enable JIT Compiler for these sites. OpenLiteSpeed does not use PHP-FPM, and
ols.inihas no OPCache lines. - When you change the PHP version, FlyWP also updates the
lsphppath in/home/fly/<domain>/config/ols/httpd_config.conf.
Both Stacks
Section titled “Both Stacks”The server-wide Nginx proxy in front of all sites gets a client_max_body_size set to the largest Max File Upload Size of all sites on the server.
Where to Add Custom Settings
Section titled “Where to Add Custom Settings”Pick the place by what you want to change. Only .user.ini survives a dashboard save; everything in config/php/ is reset (see What Happens When You Click Save Changes).
| You want to | Nginx sites | OpenLiteSpeed sites |
|---|---|---|
| Change a value the dashboard has (memory, uploads, execution time, input vars; on Nginx also pool size and OPCache) | The PHP page | The PHP page |
| Change memory, upload, execution time or input vars per site and keep them after dashboard saves | app/public/.user.ini | ols.ini (reset on save) |
Add a PHP directive the dashboard does not have, such as date.timezone | custom.ini (reset on save) | ols.ini (reset on save) |
Change PHP-FPM pool settings, or set a PHP value that .user.ini cannot change | zz-docker.conf (reset on save) | No PHP-FPM pool; set PHP values in ols.ini (reset on save) |
What Happens When You Click Save Changes
Section titled “What Happens When You Click Save Changes”When you click Save Changes, FlyWP runs these steps in order:
- Resets the site's
configfolder to FlyWP's default copy (git reset --hard, thengit pull). - Writes your dashboard values into the files in
config/php/, and updates the Nginx limits for the site and for the server proxy. - Recreates the site's containers.
- Sets
WP_MEMORY_LIMITinwp-config.phpto the memory limit you chose.

Recommended: Use a .user.ini File
Section titled “Recommended: Use a .user.ini File”For per-site changes, a .user.ini file is the safest option on Nginx sites. It lives in your site's files, so dashboard saves do not touch it.
These steps are for Nginx sites. On OpenLiteSpeed sites, use ols.ini instead.
-
Connect to your site over SSH or SFTP. See SSH Keys and Site-Specific SFTP Access.

-
Create the file in your web root,
/home/fly/<domain>/app/public/.user.ini. A file inapp/(one level up) is not read. -
Add the settings you want, for example:
memory_limit = 512Mmax_execution_time = 180max_input_vars = 5000upload_max_filesize = 256Mpost_max_size = 256M -
Wait up to 5 minutes for PHP to pick up the file. To apply the changes right away, restart PHP (this needs SSH as
fly):Terminal window cd /home/fly/<domain> && docker compose restart php
Things to know:
.user.inionly supports per-directory settings. These work:memory_limit,upload_max_filesize,post_max_size,max_execution_timeandmax_input_vars. Most OPCache settings and the PHP-FPM pool settings (pm.*) cannot be set in.user.ini. Use the dashboard for those.- PHP re-reads the file every 5 minutes (
user_ini.cache_ttlis 300). Each PHP worker keeps its own cache, so for a few minutes some requests can still show the old value. - Values in
.user.inioverride the dashboard for this site. Because the dashboard does not show them, what you see there can differ from what actually runs. Keep a note of what you set. - Nginx has its own upload limit (
client_max_body_size, 100M unless you raised it). Even with a largerupload_max_filesizein.user.ini, uploads above that limit are still blocked; raise Max File Upload Size in the dashboard to increase it. - To check the values that run on your site, open Tools → Site Health → Info → Server in WP Admin. Running
wp evalorphp -iover SSH uses the command line, not the web server, so it does not show.user.inivalues.
Edit the Config Files Directly
Section titled “Edit the Config Files Directly”Use this approach when you need a setting that neither the dashboard nor .user.ini can set. These edits are lost on every dashboard save (see the caution above), so you must repeat them each time.
Connect to your server as fly first. See SSH Keys.
Nginx Sites
Section titled “Nginx Sites”-
Open
custom.inifor extra directives, or the file that holds the setting (see Nginx Sites):Terminal window cd /home/fly/<domain>/config/phpnano custom.ini -
Add your directives and save the file.
-
Restart PHP to apply the change:
Terminal window cd /home/fly/<domain> && docker compose restart php
Always use docker compose restart php. Each file is mounted into the container on its own. Editors and commands such as sed -i replace the file, and the running container can keep the old copy until PHP is restarted. A graceful reload (kill -USR2) does not always pick these edits up.
PHP-FPM Pool: zz-docker.conf
Section titled “PHP-FPM Pool: zz-docker.conf”On Nginx sites, PHP runs under PHP-FPM. config/php/zz-docker.conf is the configuration of its [www] pool, mounted at /usr/local/etc/php-fpm.d/zz-docker.conf. PHP-FPM reads the files in that folder in alphabetical order, so zz-docker.conf overrides the image's www.conf and docker.conf.
The file sets:
listen = /run/php-fpm/fpm-www.sock: the socket Nginx uses to reach PHP. Do not change it, or the site stops responding.pm,pm.max_children,pm.start_servers,pm.min_spare_servers,pm.max_spare_serversandpm.process_idle_timeout: written from Process Manager Type and the fields under it on every save.
You can add other pool directives at the end of the file, under the [www] section. For example:
pm.max_requests = 500request_terminate_timeout = 120sphp_admin_value[memory_limit] = 512Mphp_value[max_input_vars] = 3000pm.max_requestsrestarts each PHP worker after that many requests.request_terminate_timeoutstops a request that runs longer than this.php_value[...]andphp_admin_value[...]set PHP values for the pool. They override the.inifiles inconf.d, including the dashboard values. A.user.inican still change aphp_value, but not aphp_admin_value.
Restart PHP to apply, as in the steps above. Like the other files, zz-docker.conf is reset on every dashboard save, and the pool sizes are written again from the dashboard.
OpenLiteSpeed Sites
Section titled “OpenLiteSpeed Sites”-
Open
ols.ini. It is the only PHP file an OpenLiteSpeed site loads, socustom.iniand the other files have no effect:Terminal window cd /home/fly/<domain>/config/phpnano ols.ini -
Change or add your directives and save the file.
-
Recreate the site's containers to apply the change. This is what the dashboard does:
Terminal window cd /home/fly/<domain> && docker compose down && docker compose up -d
ols.ini is reset on every dashboard save, like the Nginx files.
Troubleshooting Manual Edits
Section titled “Troubleshooting Manual Edits”If the site stops working after an edit, check the container log for a syntax error, undo your change to that file, and apply again.
On Nginx sites:
cd /home/fly/<domain> && docker compose logs phpcd config && git checkout php/<file>cd .. && docker compose restart phpOn OpenLiteSpeed sites:
cd /home/fly/<domain> && docker compose logs openlitespeedcd config && git checkout php/ols.inicd .. && docker compose down && docker compose up -dAlternatively, go to the PHP page, change any field (the Save Changes button stays disabled until a field changes), and click Save Changes. That restores FlyWP's defaults for all files in config/php/ and applies your dashboard values.
Important Considerations
Section titled “Important Considerations”Compatibility
Section titled “Compatibility”- Ensure your application (e.g., WordPress, plugins, themes) supports the selected PHP version
- Upgrading to PHP 8.x can break outdated plugins
Performance
Section titled “Performance”- Newer PHP versions (8.3/8.4/8.5) offer better performance and lower memory usage
- Recommended for production unless compatibility issues exist
Downgrade Risks
Section titled “Downgrade Risks”- Downgrading PHP may cause fatal errors if code uses newer features
- Always test before switching in production
Recommended Workflow (Production)
Section titled “Recommended Workflow (Production)”- Clone site to staging
- Change PHP version on staging
- Test critical functionality
- Apply the same change to production
Verification
Section titled “Verification”After switching:
- Check site loads correctly
- Review error logs (under Monitoring & Logs → Logs)
- Verify WP Admin access
- Monitor performance
Troubleshooting
Section titled “Troubleshooting”- White screen / 500 error → check PHP error logs
- Plugin errors → disable incompatible plugins
- Composer apps → run dependency updates if needed
Best Practice
Section titled “Best Practice”- Use PHP 8.3 or newer unless you have legacy constraints, and test on staging first when moving to a newer release
- Keep PHP version aligned with your stack and framework requirements
- Periodically review and upgrade
Still stuck? How can we help?
View as Markdown