php.ini overview

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:
01 Domains Control Panel.fw.png

It's highly recommended that you upgrade to the latest version of PHP as DreamHost will soon EOL PHP version 5.5. Please visit the following pages to view information on how to update to the latest PHP version:

DreamHost pre-installs the following versions of PHP on its servers:


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

See also

Internal links

External links