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 256MB, 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 on 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 file manager in the panel or a third-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 .user.ini file.

    Make sure the filename starts with a period.

  4. View the Creating and editing a file via FTP article for full instructions on creating, editing, and saving this file with your PHP settings.

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 file manager in the panel or a third-party client to log in.
  2. Locate your login credentials using the instructions under Option #2.
  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 new .user.ini file.

    Make sure the filename starts with a period.

  6. View the Creating and editing a file via SSH article for full instructions on creating, editing, and saving this file with your PHP settings.

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

Adjusting the wp-config.php memory limit

If you're trying to increase your site's PHP memory limit, you will need to take an extra step after you have edited your .user.ini file. View the following article for instructions on editing your wp-config.php file:

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.

Still not finding what you're looking for?