The php.ini file is the main configuration file that controls how PHP behaves on your server, including settings such as memory limits, file upload size, execution time, and error reporting. Adjusting these values can help improve your website’s performance or fix compatibility issues with specific scripts, plugins, or themes.
You can configure the PHP settings for your website in two ways through your cPanel: by editing the .user.ini file directly or using the MultiPHP INI Editor. Both methods allow you to update PHP configurations to match your website’s requirements and override the server’s default settings when needed.
Note: Make sure to apply the changes to the correct domain, especially if your hosting account contains multiple domains or websites. Incorrectly modifying PHP settings for another domain may affect its performance or functionality.
1. Using .user.ini via File Manager (manual method):
1. Access
cPanel directly through your
Z.com account.
2. Once you have reached the cPanel dashboard, locate
Files under
File Manager.
3.
Navigate to your website’s document root.
• If it is your main domain, open the public_html folder.
• If it is an addon domain, open that domain’s specific folder (for example, yourdomain.com).
4.
Create or edit the .user.ini file.
• If you already see a file named .user.ini, right-click it and choose Edit.
• If it does not exist, click + File at the top and name it .user.ini (with the dot at the start).
5.
Add or modify PHP settings by typing the PHP directives you want to change. Once done, click
Save Changes.
*Each line sets one PHP configuration value.
A successful example of the newly applied settings should look like this.
2. Using MultiPHP INI Editor in cPanel (simpler interface method):
1. Access
cPanel directly through your
Z.com account.
2. Once you have reached the cPanel dashboard, locate
MultiPHP INI Editor under
Software.
3. Ensure you are on the
Basic Mode tab. Hover over the Select a location field drop-down menu, then select home directory or your domain name to open the corresponding PHP configuration.
*For the
Editor Mode tab usage, you may refer to our guide on
how to use the MultiPHP INI editor in cPanel.
Note: Choose the
Home Directory if you want the PHP settings to apply globally to all domains and subdomains under your hosting account. Choose a
domain’s document root if you want to apply the PHP settings only to that specific website/domain.
4.
Adjust the settings for each PHP directive according to your website’s needs. For example, increasing the value under Setting to increase the upload resource limits. Once done, click
Apply.
A successful example of the newly applied settings should look like this.