How to Edit the PHP INI Settings
If you are a website owner or a developer, you might be familiar with cPanel's MultiPHP INI Editor. It is a powerful tool that allows you to edit the PHP INI settings. This is a great feature for those who want to customize their website's PHP settings to improve the performance and functionality of their site. In addition to the MultiPHP INI Editor, cPanel also offers the MultiPHP Manager, which gives you a way to change the PHP version of your sites. This is an essential feature for those using multiple PHP versions on their server who want to switch between them easily.
This article will provide information on how to edit the PHP INI settings using two modes, Basic and Editor.
- Why Should One Edit the PHP Ini Settings?
- How to Edit the PHP INI Settings
- Troubleshooting Tips
- Summary
Why Should One Edit the PHP INI Settings?
There are several instances where editing PHP INI settings might be necessary. For example, you should increase the maximum file upload size, change the execution time of a script, or turn certain PHP extensions on or off. These settings can impact the performance and functionality of your website or application, so it's important to have the ability to modify them as needed. In short, editing PHP INI settings gives you greater control over the behavior of your PHP environment and can help ensure that your website or application runs smoothly.
Making incorrect changes to PHP INI settings can cause errors, crashes, or other unexpected behavior in your PHP application. That's why it's important to back up the original configuration before making any modifications. This way, you can easily revert to the previous settings if something goes wrong. It's always a good practice to proceed cautiously and make changes only after fully understanding their potential impact on the application.
How to Edit the PHP INI Settings
Important note: Before making the changes, you must be aware of backward compatibility issues with scripts: Older PHP coding may not be compatible with newer PHP versions. Avoid skipping versions, and instead, make updates gradually. Note that this is a global change and will affect how the specified PHP version operates for the server.
If you are new to cPanel or the MultiPHP INI Editor, you might wonder how to edit the PHP INI settings using this tool. You will be glad that cPanel offers two modes for editing PHP INI settings: Basic and Editor. Each mode has advantages and disadvantages, so it is important to understand them before changing your PHP settings.
The Basic mode of the MultiPHP INI Editor is designed for beginners to become familiar with the PHP settings. It provides a simple and easy-to-use interface where you can make basic changes to your PHP settings, such as memory limit, execution time, and error reporting. This mode is ideal for those new to PHP or uncomfortable with making advanced changes to their PHP settings.
On the other hand, the Editor mode of the MultiPHP INI Editor is designed for advanced users who want to make more complex changes to their PHP settings. This mode provides a full-featured editor where you can edit your PHP settings manually, line by line. This mode is ideal for those comfortable with PHP who want to make advanced changes to their PHP settings.
Basic Modes
It allows you to make changes to some common types of PHP configuration.
- Log in to your Bluehost Account Manager.
- Once logged in, find and click the Hosting tab on the left side of your Account Manager dashboard.
- Choose the Hosting Package name you want to manage under the All My Hosting Packages section.
- If you have multiple Hosting packages on your account, click the MANAGE button on the Hosting package you want to manage.
- If you only have a single Hosting package on your account, you will be rerouted to the Hosting Overview page.
- Click on the cPANEL button under the Quick Links section.
- Under the Software section, click the MultiPHP INI Editor link.
- From the drop-down, select the home directory or a domain’s document root to open the corresponding PHP configuration.
- Under the Basic Mode, there is an option to edit the most commonly changed variables:
- max_execution_time
- max_input_vars
- memory_limit
- upload_max_filesize
- Once the changes have been made, select the Apply button.
Editor Mode
It makes your life easier by adding custom PHP configuration changes. It also allows you to change PHP variables not shown in the Basic Mode.
Important Note: You must be extremely cautious when changing it. Errors could have resulted in a non-functional PHP script. Only advanced users should use this section.
- Log in to your Bluehost Account Manager.
- Once logged in, find and click the Hosting tab on the left side of your Account Manager dashboard.
- Choose the Hosting Package name you want to manage under the All My Hosting Packages section.
- If you have multiple Hosting packages on your account, click the MANAGE button on the Hosting package you want to manage.
- If you only have a single Hosting package on your account, you will be rerouted to the Hosting Overview page.
- Click on the cPANEL button under the Quick Links section.
- Under the Software section, click the MultiPHP INI Editorlink.
- Under the Editor Mode, there is a drop-down; select the home directory or a domain’s document root to open the corresponding PHP configuration.
- In the Search text field, type the PHP setting you are looking to update.
PHP has been configured to use the following settings on our shared and reseller servers:
php_flag display_errors Off (cannot adjust) php_flag memory_execution_time 30 (MAXIMUM in seconds) php_flag max_input_time 60 (MAXIMUM in seconds) php_flag max_input_vars 1000 (MAXIMUM in seconds) php_flag memory_limit 256M (MAXIMUM amount of memory a script may consume) php_flag post_max_size 260M (MAXIMUM) php_flag session.gc_maxlifetime 1440 (MAXIMUM) php_flag session.save_path "/var/cpanel/php/sessions/ea-php70" (MAXIMUM) php_flag upload_max_filesize 256M (MAXIMUM) php_flag zlib.output_compression off (cannot adjust)
- Once the change has been made, select the Save button.
Pro Tip: To verify that the changes take effect, please look at the phpinfo page. To access it, follow this link format: https://example.com/phpinfo.php.
If you want to know more about the extensive description of configuring the php.ini file, you may visit this MultiHP INI Editor documentation for more help.
Troubleshooting Tips
If you encounter any issues after making changes to your PHP INI settings, there are a few basic troubleshooting tips you can try. First, if you backed up your original configuration, you can revert to those settings to see if that resolves the issue. If you didn't make a backup, reset the settings to their default values.
Another common mistake is typos or other errors in the PHP INI file. Check to ensure there are no syntax errors or misspellings in the file. You can also comment on any new settings you added to see if they are causing the issue.
If you're still experiencing issues, consult online forums or seek assistance from a developer familiar with PHP. Remember, it's always better to proceed cautiously and make changes only after fully understanding their potential impact on your application.
Summary
cPanel's MultiPHP INI Editor is a powerful tool that allows you to edit the PHP INI settings. Whether you are a beginner or an advanced user, you can use this tool to customize your website's PHP settings and improve its performance and functionality. By understanding the Basic and Editor modes of the MultiPHP INI Editor, you can make the most of this tool and take your website to the next level.
Using the MultiPHP INI Editor effectively can help you manage your PHP settings with ease and confidence. With the ability to view, edit, and reset PHP settings, you can ensure that your website or application runs smoothly and efficiently. Additionally, the Editor helps you avoid common mistakes, such as syntax errors or misspellings, which can cause issues with your PHP configuration. By making informed and careful changes, you can optimize your PHP settings and enhance the performance of your application.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.