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

Change PHP Settings with a Custom php.ini File

This guide shows you how to change PHP settings, such as upload size and memory, by adding your own php.ini file.

How-To Guides2 min read11 steps

What is php.ini?

PHP is the language that runs many websites, such as WordPress. php.ini is PHP's settings file. It decides things like how big an upload can be and how long a script may run. A custom php.ini is your own copy of some of these settings. It affects only your site. Whether it works depends on how PHP is set up on your plan. Ask Hostvento support if the steps below do not work.

Warning: A wrong value can break your site. Take a backup of your website files before you change anything.

Common settings

SettingWhat it does
upload_max_filesizeBiggest single file you can upload
post_max_sizeBiggest amount of data in one form send
memory_limitMemory one script may use
max_execution_timeSeconds a script may run

Steps

  1. Log in to your hosting control panel. Your welcome email has the details.
  2. Open File Manager.
  3. Go to the folder of your website. This is often public_html.
  4. Click New File and name it php.ini. If one already exists, right-click it and pick Edit.
  5. Add your settings. For example:
    upload_max_filesize = 64M
    post_max_size = 64M
    memory_limit = 256M
    max_execution_time = 300
    Each line is one setting. M means megabytes.
  6. Click Save Changes.
  7. Wait a few minutes. PHP can take a short time to read the file.

Check that it worked

  1. Create a file named info.php with this content.
    <?php phpinfo();
  2. Open it in your browser, for example yourdomain.com/info.php.
  3. Search the page for a setting, such as memory_limit.
  4. Delete info.php when you finish. It shows private details.

If it does not work

  • Some servers read a file named .user.ini instead. Try the same lines in that file.
  • Some control panels have a MultiPHP INI Editor or Select PHP Version tool. This is an easy place to change settings.
  • Limits set by the server cannot be raised by you. Ask Hostvento support.

Quick recap

  • php.ini holds PHP settings.
  • Create it in your website folder with File Manager.
  • Test with phpinfo() and delete the test file after.
  • Try .user.ini or ask support if it is ignored.