For Managed Dedicated Servers
You can change your PHP settings locally by creating a file named php.ini and uploading it to the appropriate directory. You will need to insert the required statements - the so-called php.ini directives - into the php.ini file.
Since PHP is connected through CGI, setting the PHP flags using a .htaccess file does not work! The php.ini file only works in the respective directory. If the settings are also to apply to subdirectories, a copy must be stored in each directory.
Customized php.ini files replace the global php.ini configuration. In addition, all directives that are not listed in the custom php.ini files are reset to their default settings.
Since PHP 5.3.0, PHP provides support for directory-level configuration INI files. In addition to the main php.ini file, PHP now also searches for additional INI files in each directory. This support allows you to alternatively customize the local PHP settings using .user.ini files. The advantage of a .user.ini file is that it also applies to all subdirectories. Always make sure that you do not use both INI file types simultaneously in the same folder. More information about the .user.ini file can be found here.
You want to increase the memory_limit directive for your index.php to 512 MB. To do this, add the following line into the php.ini file. Then, upload the file to the directory containing the index.php.
memory_limit = 512M