php.ini overview

If you find yourself in a situation that requires changes to your site, and your developer isn't available to help, DreamHost's skilled support team may be able to assist you for a small fee. You can find more information about supported services and associated costs in the DreamHost Professional Services article.

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 256MB. 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.

DreamPress PHP customizations

If you need to adjust your PHP settings within DreamPress, view the following article:

  • Customizing your PHP settings with DreamPress

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 following articles explain how to view the PHP version of your site and change it:

  • What version of PHP is my site using?
  • How do I change the PHP version of my site?

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.

  • How do I create a phprc file via FTP? (easier for beginners)
  • How do I create a phprc file via SSH? (for advanced users)

Updating your changes

After you've created your phprc file, you should update your PHP configuration to ensure the new settings take effect. View the following article for further details:

  • Killing off running PHP processes

See also

Internal links

  • 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
  • Where can I view PHP errors and warnings?
  • Cannot modify header information
  • How do I make global phprc changes on a Dedicated server?
  • Customizing your PHP settings with DreamPress

External links

  • PHP: php.ini directives – Manual (from php.net)
  • PHP: Runtime Configuration – Manual (from php.net)
  • PHP: How to change configuration settings – Manual (from php.net)

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?