Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Change Settings in the php.ini File

This guide shows you how to open and edit the php.ini file, so you can change PHP limits such as upload size and memory.

How-To Guides2 min read9 steps2 screenshots

What is php.ini?

PHP is the language many websites use to run. The php.ini file is a small text file that holds PHP's settings. Think of it as a control panel made of plain text. Each line sets one rule, such as how big an uploaded file may be.

Common settings you may want to change

SettingWhat it does
memory_limitHow much memory one script may use
upload_max_filesizeThe biggest file a visitor may upload
post_max_sizeThe biggest amount of form data allowed
max_execution_timeHow many seconds a script may run

Steps

Warning: a wrong setting can break your site. Take a backup of the file first.

  1. Log in to your hosting control panel. Your welcome email tells you where.
  2. Open the File Manager.
    Screenshot: Open the File Manager .
  3. Go to the folder of your website. This is often called public_html.
  4. Look for a file named php.ini. If it is not there, create a new file with that name.
  5. Right-click the file and choose Copy to make a backup copy.
  6. Right-click the original and choose Edit.
  7. Find the line you want to change, or add a new line at the bottom. For example:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

These lines allow more memory, bigger uploads and longer-running scripts. The letter M means megabytes.

  1. Click Save Changes.
    Screenshot: Click Save Changes .
  2. Reload your website and check that it still works.

Checking that the change worked

Create a file called info.php with this content:

<?php phpinfo(); ?>

Open it in your browser. It lists every PHP setting. Delete the file afterwards, because it shows private details.

Tip: Some hosting plans use a different place for PHP settings, such as a PHP selector in the control panel. Some servers also limit how high a value can go. Ask Hostvento support if your change has no effect.

Quick recap

  • php.ini holds the settings for PHP.
  • Back up the file before you edit it.
  • Change one value at a time and save.
  • Test your site and remove any info.php file you made.
  • Ask support if the change does not apply.