A php.ini file is a simple text file that allows you to adjust your PHP settings. For example, the server comes with a few default settings such as a PHP memory_limit of 90MB. Other limits that are often changed are for PHP execution time and upload size. This article walks you through how to set up a php.ini (phprc) file and add your custom adjustments.
The standard term for this file is php.ini. However, as of PHP 5.3, DreamHost uses a "phprc" file instead. This acts the same way – only the name is different. In this article, only the term phprc is used.
Determine which PHP version your website uses
Before you create a phprc file, you’ll need to know which version of PHP your site is running. The PHP version for each site is displayed on the (Panel > ‘Domains’ > ‘Manage Domains’) page.
- You’ll see the version assigned to any domain to the right under the 'Web Hosting' column:
DreamHost pre-installs the following versions of PHP on its servers:
- PHP 7 - The latest version of PHP that DreamHost has to offer.
- PHP 5.6 - Widely supported version of PHP.
- PHP 5.5 - Soon to be End-Of-Lifed by php.net.
- PHP 5.4 - No longer supported. Officially End-Of-Lifed by php.net.
- PHP 5.3 - No longer supported. Officially End-Of-Lifed by php.net.
- PHP 5.2 - No longer supported. Officially End-Of-Lifed by php.net.
All custom phprc files can be created via SSH on your server (VPS or Dedicated) running NGINX. If you need to update your changes on a Dedicated server running NGINX, run the following command under your Dedicated admin user:
[server]$ sudo /etc/init.d/nginx restart
If you receive a 504 timeout on your website, you must stop nginx, kill PHP, and then finally restart nginx. Run the following commands under your admin user to update your settings:
[server]$ sudo /etc/init.d/nginx stop [server]$ pkill -9 php [server]$ sudo /etc/init.d/nginx start
- How do I create a phprc file via FTP?
- How do I create a phprc file via SSH?
- How do I increase the PHP upload limit?
- How do I increase the PHP memory limit?
- How do I enable PHP error logging?
- How do I enable PHP extensions and loaders?
- My phprc file isn't updating
- How do I turn off PHP errors and warnings?
- Cannot modify header information
- ownCloud errors due to OPcache
- How do I make global phprc changes on a Dedicated server?