With so many Content Management Systems available, and each having it's own particulars, occasionally our standard PHP settings may not be configured exactly to suit your website.
Because we run suPHP on our Linux Cloud hosting, you can configure your own PHP variables by way of a localised php.ini.
As an example, you can set the 'upload_max_filesize' within your own php.ini and place that in the directory that you want it to affect.
As standard, we have a global setting for 'upload_max_filesize' of 100MB. This is set using the following variable:
upload_max_filesize = 100M
Some site functions or plugins, such as the BackupBuddy Importer for Wordpress, may use larger files which then need to be uploaded via PHP, this might not be adequate. To resolve this, we can add a php.ini file to BackupBuddy's own directory with a single line which increases that upload limit, as such:
upload_max_filesize = 200M
In this example, we're only setting an increased limit of 200MB so you would need to specify a limit that exceeds the size of the file you want to upload.
As much as that may work well for an individual variable for a certain script, there are occasions where we want to be able to configure the variables for an entire website and adjust these via a single file. In this case, what we can do is place our custom php.ini file into the Home directory of the site and load that using the following line at the top of the .htaccess file that resides within public_html:
This does need to be adjusted for your own site, where the path is dictated by your domain name.
The letter /e/ in this case is the first letter of 'example.com'.
If your site is linux.com, the preceeding letter will be /l/
Please note: It is not possible to do this if a site is configured to use Windows. If you'd like to use your own php.ini, it is recommended to set your hosting type to "Linux" or "Hybrid with Linux Bias".
Also, as we offer different PHP versions on our Linux Cloud platform, we do have template php.ini files for each version.
If you are using a php.ini file that was placed by a member of our Support Team and you wish to change the PHP version for your site, please contact support@Tsohost.com to obtain a version specific file for your site.