Customize PHP settings

Override memory_limit, max_execution_time and other PHP settings with a .user.ini file.

The default PHP configuration of your website can be overridden with a .user.ini file. You place the file in /wwwroot and write the settings in the same format as in the main php.ini.

This article assumes that PHP is already enabled and a PHP version is selected for your website — see Run PHP on your website.

Create the .user.ini file

The example changes three commonly adjusted parameters: max_execution_time, max_input_time and memory_limit.

  1. Check the current values

    In the Control Panel open your website, choose Scripting and click Show phpinfo() in the PHP card. Find the parameters you want to change and note their default values.

  2. Write the file

    Create a file named .user.ini with the parameters you want to override:

    max_execution_time = 200
    max_input_time = 200
    memory_limit = 512M
    
  3. Upload it into wwwroot

    Upload the file into /wwwroot, the root directory of your website. The simplest way is WebFTP: open webftp.monsterasp.net, or click Open next to WebFTP on the Deploy page.

  4. Verify

    Open the phpinfo() page again. The parameters now show your customized values.

.user.ini can be deployed like any other file of the website — with Web Deploy from the command line, in a ZIP archive or over FTP / SFTP.

Note

Other runtime settings, such as upload_max_filesize and post_max_size, are changed the same way.

Still stuck? Our support team is happy to help.
Ask the community Open a support ticket