Customizing your PHP settings with DreamPress

Overview

A .user.ini file is a simple text file that allows you to adjust your PHP settings. For example, the version of PHP on the server comes with a few default settings such as a memory_limit of 90MB and you can change this using a .user.ini file.

What PHP settings can I customize?

View the following category for a list of articles of common PHP customizations:

Creating a .user.ini file

To customize your PHP settings, create a file named .user.ini in your website's directory. For example:

/home/username/example.com

You can create a .user.ini file by logging into your server via FTP or SSH. The following sections describe how to do this for both methods.

Creating a .user.ini file via FTP (recommended for beginners)

  1. View the following article for instructions on how to log into your DreamPress web server. You can use the WebFTP portal in the panel, or a 3rd party client to log in.
  2. Once logged in, navigate to your website directory where your files are located.
  3. In this directory, create a new file named .user.ini.

    Make sure the filename starts with a period.

  4. Once you save it, your settings automatically update in approximately 5 minutes.

Creating a .user.ini file via SSH (for advanced users)

  1. View the following article for instructions on how to log into your DreamPress web server. You can use the WebFTP portal in the panel, or a 3rd party client to log in.
  2. Option #2 explains how to locate your login credentials.
  3. Visit the SSH overview and SSH client software articles for instructions on how to log into your DreamPress server.
    [server]$ cd ~/example.com
  4. Navigate to your website's directory.
  5. In your website's directory, create a file named .user.ini.

    Make sure the filename starts with a period.

  6. Once you save it, your settings automatically update in approximately 5 minutes.

Updating your changes

After you've created your .user.ini file, you only need to wait 5 minutes for the changes to update. This value is set as 300 seconds in your PHP settings, so you do not need to manually restart PHP for the changes to take effect.

Did this article answer your questions?

Article last updated PST.