System status parameters guide

The IonMag theme includes a section called System Status where you can check the server and WordPress parameters. This article will guide you on setting up all the parameters for optimal performance.

WP-Config settings

The wp-config.php file is located in the WordPress root directory.

WP Memory Limit

This parameter sets the amount of memory used by PHP and by default WordPress can go up to 40MB. To avoid the Memory Exhausted error, this parameter should be at least 64MB, and you can do this from WordPress wp-config.php file.

define( 'WP_MEMORY_LIMIT', '64M' );

WP Debug

It is an option intended for development. It controls the reporting of some errors and warnings. It may display unwanted messages so you should disable it on your side. You can also do this from WordPress wp-config.php file. The default value is false.

define('WP_DEBUG', false);

Php.ini parameters

  • max_input_vars – This sets how many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately). By default, this parameter is set to 1000, and this may cause issues when saving the menu, we recommend that you increase it to 2000 or more.
  • max_execution_time – This sets the maximum time in seconds a script is allowed to run before the parser terminates it. The theme demos download images from our servers and depending on the connection speed this process may require a longer time to execute. We recommend that you should increase it to 60 or more.
  • post_max_size – Sets max size of post data allowed. This setting also affects file upload. To upload large files, you have to increase this value, and in some cases, you also have to increase the upload_max_filesize value.

Depending on the host they can be set from php.ini or .htaccess:

php.ini

max_input_vars = 5000
max_execution_time = 300
post_max_size = 50M

.htaccess

php_value max_input_vars 5000
php_value max_execution_time 300
php_value post_max_size 50M

Note – Before trying any of those check the host documentation to see what is their recommended method.

The location of the php.ini may also differ from one server to the other. Usually, it’s located in the WordPress root, but on some servers, it may be found in another location, you have to check the host documentation for more details.

  • Suhosin is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. If it’s installed on your host, you have to increase the suhosin.post.max_vars and suhosin.request.max_vars parameters to 2000 or more.

php.ini

suhosin.request.max_vars = 5000
suhosin.post.max_vars = 5000

.htaccess

php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000

Note – If Suhosin is not installed on the host, you don’t have to modify these parameters.