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

When you create your phprc file on the server, you'll use this PHP version to specify the correct location of the file.

How to create a phprc file

You can create a phprc file by logging into your server via FTP or SSH. The following links walk you through each option.

The FTP version is easier for beginners.


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

Did this article answer your questions?

Article last updated .