How to Increase PHP Memory Limit, max_input_vars, and Upload Size in WordPress
After installing a WordPress theme you may see warnings in the Theme Dashboard: insufficient PHP memory, file upload limit too low, or max_input_vars too small. All three are PHP configuration values that can be adjusted without touching WordPress core. Here’s how to fix each one.
1. Increase PHP Memory Limit
WordPress requests 40 MB of PHP memory by default, but modern themes and plugins — Elementor, WPBakery, Revolution Slider — need at least 256 MB to run reliably.
Method 1: wp-config.php (recommended)
Open wp-config.php in the site root and add the following line before “That’s all, stop editing!”:
define( 'WP_MEMORY_LIMIT', '256M' );
Method 2: .htaccess (Apache servers)
php_value memory_limit 256M
Method 3: php.ini
memory_limit = 256M
Note: If your hosting plan does not allow changing this value, contact your host’s support or upgrade to a plan with a higher memory limit.
2. Increase Maximum File Upload Size
By default PHP limits uploaded files to 2–8 MB depending on the server. You’ll need a higher value when importing demo content, uploading videos, or working with large images.
Method 1: .htaccess
php_value upload_max_filesize 64M
php_value post_max_size 64M
Method 2: php.ini
upload_max_filesize = 64M
post_max_size = 64M
Method 3: wp-config.php
@ini_set( 'upload_max_size', '64M' );
@ini_set( 'post_max_size', '64M' );
Note: post_max_size must be equal to or larger than upload_max_filesize. If post_max_size is smaller, the effective upload limit will not increase.
3. Increase max_input_vars
max_input_vars caps the number of fields that can be submitted in a single POST request. Themes with large options panels (Redux Framework, Kirki) may silently fail to save settings when this value is too low. 3000 or higher is recommended.
Method 1: .htaccess
php_value max_input_vars 3000
Method 2: php.ini
max_input_vars = 3000
Note: After editing php.ini, restart PHP-FPM (php-fpm reload) or Apache for the changes to take effect.
How to Check Current Values
Go to WordPress Admin → Appearance → Theme Dashboard → System Status. This page displays all current PHP values and flags anything that falls below the recommended threshold.
Recommended Minimum Values
memory_limit— 256Mupload_max_filesize— 32M (64M for demo import)post_max_size— 64Mmax_input_vars— 3000max_execution_time— 300






