Overview
The following describes how to ensure any adjustments you made to your phprc file take effect.
Background
It’s possible that even if you’ve correctly updated your phprc file, you may notice that any customizations are not displaying. If so, you will need to kill off all running PHP processes under your user to ensure your new settings take effect.
DreamPress sites
These directions apply to non-DreamPress sites. If you're attempting to update your PHP settings with a DreamPress site, see this article instead.
How to update
The following sections explain how to get your server to read your phprc file updates.
Killing off your PHP processes (all servers)
To kill off all running PHP processes, log in to your server via SSH and run the following command based on your version of PHP:
In the following examples, replace shelluser with your actual SSH username in all lowercase.
For PHP 8.2:
[server]$ killall -9 php82.cgi -u shelluser
For PHP 8.3:
[server]$ killall -9 php83.cgi -u shelluser
For PHP 8.4:
[server]$ killall -9 php84.cgi -u shelluser
Killing off your PHP processes in this way updates your phprc file.
If you see php##.cgi: no process found after running the killall command, it means that no PHP processes are running. To proceed, perform a hard refresh in your browser to view your updated phpinfo.php page. You should now see your settings have updated.
Restarting Nginx
VPS and Dedicated servers
If you have previously changed your server to run Nginx, you can update your phprc file by reloading Nginx in the panel.
Manually killing 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
Updating WordPress and DreamPress sites
If you have adjusted the PHP memory limit and your WordPress site is not reading 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 to update this line to match what you've added to your phprc file.