Home > Backend Development > PHP Problem > How to modify php.ini in cpanel

How to modify php.ini in cpanel

藏色散人
Release: 2023-03-05 07:20:02
Original
3171 people have browsed it

How to modify php.ini in cpanel: First download the "php.ini" file in the root directory of cPanel to the local; then use an editor to open the file; finally find the parameters that need to be modified and modify them.

How to modify php.ini in cpanel

Recommended: "PHP Video Tutorial"

cPanel Control Panel Modification php.ini Tutorial

Most Linux hosting providers in the United States use the powerful cPanel control panel, through which we can easily manage the website. However, many webmasters will encounter some functional restrictions during operation, such as the common upload file size limit of 2M, etc. If we want to change these parameters, we can modify them by customizing php.ini.

Modify the php.ini configuration file of the host space to meet the parameters we need. So how to modify the php.ini file in the cPanel panel?

The method is very simple. Download the php.ini file in the cPanel root directory to the local (if it does not exist, you can create a new php.ini locally), and use the editor Open the file with a browser and find the parameters that need to be modified. For example, to modify the default maximum upload file size, we only need to find the following code:

upload_max_filesize = 2M
Copy after login

and then modify it to:

upload_max_filesize = 100M(这里的“100M”就是你想要该的任意值)
Copy after login

After the modification is completed, upload the file to the root directory (The root directory of cPanel’s main domain name is “public_html”).

After modifying the parameters, test whether it is feasible. If it has no effect, it may be that the host has not enabled the php.ini function. In this case, it is recommended to directly consult the space provider for assistance in enabling this function.

The above is the detailed content of How to modify php.ini in cpanel. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template