Summary of recommended “Sweet Spot” settings
Since you have 38GB of RAM, I recommend these global settings for your WordPress sites to ensure they are fast and stable:
| Setting | Recommended Value | Why? |
| memory_limit | 512M | Prevents the “exhausted” error you saw. |
| upload_max_filesize | 128M | Allows you to upload larger themes/plugins. |
| post_max_size | 128M | Must match or exceed the upload limit. |
| max_execution_time | 300 | Gives backups and updates time to finish. |
With 38GB of RAM, setting these limits is a “no-brainer.” It will make your sites much more stable and stop those annoying “2MB limit” warnings when you try to upload photos.
Since you have 60 sites, don’t do this manually. We will use the Virtualmin Command Line Interface (CLI) to update every single site in about 30 seconds.
Step 1: Run the Mass Update Commands
Open your Terminal in Virtualmin (or via SSH) and copy-paste these blocks. I have included commands for both PHP 8.3 and PHP 8.1 since your server uses both.
For PHP 8.3 Sites:
virtualmin modify-php-ini --all-domains --php-version 8.3 --ini-name memory_limit --ini-value 512M
virtualmin modify-php-ini --all-domains --php-version 8.3 --ini-name upload_max_filesize --ini-value 128M
virtualmin modify-php-ini --all-domains --php-version 8.3 --ini-name post_max_size --ini-value 128M
virtualmin modify-php-ini --all-domains --php-version 8.3 --ini-name max_execution_time --ini-value 300
For PHP 8.1 Sites:
virtualmin modify-php-ini --all-domains --php-version 8.1 --ini-name memory_limit --ini-value 512M
virtualmin modify-php-ini --all-domains --php-version 8.1 --ini-name upload_max_filesize --ini-value 128M
virtualmin modify-php-ini --all-domains --php-version 8.1 --ini-name post_max_size --ini-value 128M
virtualmin modify-php-ini --all-domains --php-version 8.1 --ini-name max_execution_time --ini-value 300
Step 2: Restart the PHP Engines
The changes won’t “kick in” until the PHP processes refresh.
-
Go to Webmin > System > Bootup and Shutdown.
-
Find
php8.1-fpmandphp8.3-fpm. -
Check both boxes and click Restart at the bottom.
Step 3: Verify the Change in WordPress
To make sure it worked:
-
Log into any of your WordPress sites.
-
Go to Media > Add New.
-
You should now see “Maximum upload file size: 128 MB” instead of 2MB.
Step 4: Fix it for “Future” Sites (The Template)
To make sure site #61, #62, etc., all have these high limits automatically:
-
Go to Virtualmin > System Settings > Server Templates.
-
Click Default Settings.
-
In the “Edit template section” dropdown, choose PHP Options.
-
Find the box Additional PHP-FPM pool options and paste this:
Plaintextphp_admin_value[memory_limit] = 512M php_admin_value[upload_max_filesize] = 128M php_admin_value[post_max_size] = 128M php_admin_value[max_execution_time] = 300 -
Click Save.
That’s it! Your taxi site should be back online now, and all 60 of your blogs are now “supercharged” with plenty of memory.
Are there any other specific errors showing up on your other sites, or is everything finally running smooth?