📌 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.
Figure 22: PHP Settings interface showing runtime directive sliders, inputs, and isolated environment status.
🖥️ Interface Tour & Elements
- 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.
- Dynamic PHP Extensions Grid: Toggle switches for compiling and enabling PHP modules (
redis,opcache,gd,imagick,pdo_mysql,curl,zip,intl,bcmath). - 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
- In the sidebar, click PHP Settings (icon:
fab fa-php). - Locate the
memory_limitfield. - Change the value from
128Mto256M(or512Mfor heavy WooCommerce stores). - Click Save PHP Directives. The PHP-FPM pool reloads gracefully in ~1 second.
Step 2: Enabling the Redis Object Cache Extension
- Scroll down to the Dynamic PHP Extensions section.
- Locate the redis extension card.
- Toggle the switch to ON.
- 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_limitto256Mor512Min the PHP Settings panel and save changes.