Skip to content
Clodo

PHP Tuning: Increasing memory_limit and upload_max_filesize Safely

Resolve memory limit exhaustion errors and increase maximum file upload quotas in PHP.

Beginner4 minUpdated:13 September 2026

In brief

  • Resolve memory exhausted errors by increasing limits.
  • In Clodo, set limits using a .user.ini file in your site root.
  • Restart the service from the panel to apply the new values.
  • Do not set the memory limit higher than your plan's RAM.

What you need

  • Write access to php.ini or .user.ini
  • An error log where you can see which limit triggers which error
  • The ability to restart PHP-FPM (or restart it from the panel)
Verified: PHP 8.1 – 8.3

When uploading themes, media libraries, or backups, you may encounter upload limit warnings or memory exhausted fatal errors caused by conservative default PHP ini limits.

1. Recommended PHP Configuration Values#

The recommended baseline values for WooCommerce, Elementor, and dynamic web apps:

php.ini
; Onerilen WordPress & PHP Ayarlari
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
Method Comparison

How to Implement This?

How to do this on a Clodo service

File manager & SFTP

You set PHP limits by placing a .user.ini file in your site root rather than with a slider in the panel. You reach that file through the panel file manager or over SFTP.

Where in Panel? Panel > Service detail > 'SFTP & Files' tab gives you the file access credentials.
Step-by-step Execution:
  1. 1Connect from the 'SFTP & Files' tab on the service detail page, or open the panel file manager.
  2. 2Create a .user.ini in your site root and add the values from this guide.
  3. 3Restart the service from the panel; PHP-FPM reads the new values on boot.
  4. 4Do not set the memory limit above your plan's RAM -- exceeding it kills the process (exit code 137).

Frequently Asked Questions

Where should I upload the .user.ini file?

You should place the file in the root directory of your website. You can reach this location via the panel file manager or SFTP.

Why do the new limits not apply immediately after editing?

PHP-FPM reads configuration directives on startup. You must restart the service from the panel for the new values to take effect.

Is there any risk to setting memory_limit too high?

Yes, if you set the memory limit higher than your plan's total RAM, the process can be killed by the OS. This appears in the console as 'exit code 137'.

Was this guide helpful?

Feedback goes straight to the team that maintains this guide.

Could not find a solution?

You can open a request with our support team from the panel.

Open a support request