1. Log in to your cPanel account, go to the Files >> section of the File Manager menu.
For the basic theme of cPanel:
2. Navigate to the root directory of the domain, click on New File and create a file called php.ini:
3. Find the newly created file in the list, right-click and choose Edit:
4. Add the required PHP configuration and click Save Changes in the upper right corner:
To verify the current PHP version and configuration, see this article.
If you want to change the values of the PHP configuration (for example, max_execution_time, memory_limit, post_max_size, upload_max_filesize, etc.), you must reset the values in the Select PHP version menu. In this way, it will be possible to overwrite the PHP configuration using php.ini.