Editing php.ini

You cannot edit php.ini directly on your Loopia web hosting account. However, you can override many common PHP settings on a per-folder basis by adding directives to an .htaccess file in your public_html folder. Upload the modified .htaccess with your FTP client (file upload program). Some common examples are shown below.

Memory limits per hosting package

The maximum PHP memory limit depends on your hosting package:

  • Silver: 128 MB
  • Gold: 256 MB
  • Platinum: 512 MB

Values higher than your package limit will be ignored.

Show PHP error messages on the page

To display PHP errors and startup errors directly in the browser (useful when debugging, but not recommended on a live site):

php_flag display_errors on
php_flag display_startup_errors on
php_value error_reporting 2047

Increase upload limits

To allow larger file uploads and POST requests:

php_value post_max_size 16M
php_value upload_max_filesize 16M

Set the PHP memory limit

To increase the PHP memory limit (within the package limit above):

php_value memory_limit 128M

Note: invalid directives or unsupported values in .htaccess can cause your website to return a server error. If your site stops working after editing .htaccess, remove the most recent change and re-upload the file via FTP.

Was this article helpful?

Related Articles