Home Articles Platform info Modify PHP-settings through .htaccess

Modify PHP-settings through .htaccess

Our servers are setup for maximum performance and speed. If you do need to adjust some PHP setting or variable, here's a guide to it.

The server environment of Servebolt is precisely tuned for performance, with hardware and software (and network). For PHP usage, this means that some of the server and environment settings may be a bit more modest than other providers. With most websites and applications, our settings are just fine. 

But in some cases you may need to modify a PHP directive. To change a PHP-setting or variable, just set the new setting with a .htaccess file. Here’s an example of directives that may be changed this way:

php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_input_vars 2000

Here’s a complete list of all (configurable) directives.

In general, we don’t recommend changing these directives. Temporary changes are always better than permanent ones. Again, our server environment is optimized for speed and changes may affect the performance of your website.

To view the default settings in our server environment, use the PHP-command phpinfo(). Just create a new PHP file called info.php with the following content: <?php phpinfo(); ?>, upload it to the root of your website and browse to it: example.com/info.php.

Did this help you?