Modify PHP Settings Using htaccess

  Print

Modify PHP Settings Using htaccess



Before using this method, be aware that you can also edit most common PHP variables easily in cPanel using the Select PHP Version option. Click here for a guide on how to use that.


To access your .htaccess file click here for a guide.

With our cPanel servers running FastCGI, we have installed htscanner. This allows you, and most of the common CMS's out there these days, to set custom values for most PHP environment settings using the websites .htaccess file. The .htaccess file can usually be found in the public_html directory, but this can change depending on site requirements.

Example tags:

<IfModule mod_php5.c>
php_value upload_max_filesize 10M
php_value post_max_size 20M
</IfModule>

For a list of PHP values that can be altered click here.




Related Articles


  • Comments

Add Comment

Replying to