My phprc file isn't updating


It’s possible that even if you’ve correctly added the phprc file, you may not notice its customizations resolving online. You may need to kill off all running PHP processes to ensure your new settings take effect.

The following describes the steps to push through any changes you make to your phprc file.

These directions apply to non-DreamPress sites. If you're attempting to update your PHP settings with a DreamPress site, view the following article:

Updating your phprc file via SSH

  1. Log into your server via SSH.
  2. Once you log in, run the following command based on your version of PHP to kill off all running PHP processes:

In the following examples, replace shelluser with your actual SSH username in all lowercase.

For PHP 8.1:

[server]$ killall -9 php81.cgi -u shelluser

For PHP 8.2:

[server]$ killall -9 php82.cgi -u shelluser

For PHP 8.3:

[server]$ killall -9 php83.cgi -u shelluser

Killing off your PHP processes in this way updates your phprc file.

If after running the killall command you see php##.cgi: no process found, this means there are no PHP processes running. Perform a hard refresh in your browser to view your updated phpinfo.php page. You should now see your settings have updated.

Updating your phprc file on an Nginx server

If you have previously changed your server to run Nginx, you can update your phprc file by reloading Nginx in the panel:

Restart Nginx and kill off PHP processes (Dedicated Servers only)

If you're on a Dedicated Server with an admin user, you can restart Nginx and kill off all running PHP processes. Run the following commands under your Dedicated admin user:

[server]$ sudo /etc/init.d/nginx stop
[server]$ pkill -9 php
[server]$ sudo /etc/init.d/nginx start

WordPress sites

If you have adjusted a PHP setting and your WordPress site is not showing the new value, check your wp-config.php file. You may see a line such as the following:

define( 'WP_MEMORY_LIMIT', '128M' );

Make sure any such settings match what you've added to your phprc file.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?