📌 Purpose & Quick Summary

Every BoostonCP account operates within an Isolated PHP Environment. The PHP Settings module empowers you to fine-tune critical PHP runtime directives—such as memory_limit, max_execution_time, and upload_max_filesize—and toggle dynamic PHP extensions (Redis, OPcache, Imagick, GD, ZIP) with 1 click without requiring server root access.

BoostonCP PHP Isolated Settings Overview

Figure 22: PHP Settings interface showing runtime directive sliders, inputs, and isolated environment status.


🖥️ Interface Tour & Elements

  1. PHP Runtime Directives Card:
    • memory_limit: Maximum memory allocation per PHP worker script (e.g. 256M, 512M).
    • max_execution_time: Timeout ceiling for long-running scripts (e.g. 300s).
    • upload_max_filesize: Maximum allowed single file upload size (e.g. 128M).
    • post_max_size: Maximum total POST payload size (e.g. 128M).
    • max_input_vars: Form input parameter limit (essential for large WooCommerce stores).
    • display_errors: Toggle to display or hide PHP errors in the browser.
  2. Dynamic PHP Extensions Grid: Toggle switches for compiling and enabling PHP modules (redis, opcache, gd, imagick, pdo_mysql, curl, zip, intl, bcmath).
  3. Save & Reload PHP Pool Button: Immediately reloads the PHP-FPM worker pool to apply directives with zero dropped connections.

🛠️ Step-by-Step Instructions

Step 1: Increasing Memory Limit for Heavy Websites

  1. In the sidebar, click PHP Settings (icon: fab fa-php).
  2. Locate the memory_limit field.
  3. Change the value from 128M to 256M (or 512M for heavy WooCommerce stores).
  4. Click Save PHP Directives. The PHP-FPM pool reloads gracefully in ~1 second.

Step 2: Enabling the Redis Object Cache Extension

  1. Scroll down to the Dynamic PHP Extensions section.
  2. Locate the redis extension card.
  3. Toggle the switch to ON.
  4. The Redis PHP module is dynamically loaded into your PHP-FPM pool. You can now use Redis object cache plugins in WordPress or Laravel.

⚙️ Complete Field & Parameter Reference Table

PHP Directive Recommended Value Typical Use Case
memory_limit 256M or 512M Complex CMS plugins, Elementor, WooCommerce, PDF generation.
max_execution_time 300 seconds Long database migrations, archive extractions, imports.
upload_max_filesize 128M High-resolution video and image media uploads.
post_max_size Must equal or exceed upload limit Ensures multi-part POST payloads are not prematurely truncated.
max_input_vars 3000 to 5000 Large WooCommerce menus and translation matrices.
display_errors Off (Production) Prevents exposing sensitive server paths to public visitors.

❓ Troubleshooting & Common Errors

1. WordPress Displays "Fatal error: Allowed memory size exhausted"

  • Cause: PHP script attempted to allocate more RAM than permitted by memory_limit.
  • Solution: Increase memory_limit to 256M or 512M in the PHP Settings panel and save changes.