Why change PHP settings with .htaccess?
The PHP settings you change with .htaccess define the operating limits of your website (e.g. upload size, available memory, script execution time).
At Konet, thanks to CloudLinux OS + LiteSpeed Enterprise Web Server, you can easily adjust these settings through the .htaccess file.
Important: The maximum limits are always determined by your hosting plan and the upper security limits we have set.
Where is the .htaccess file?
-
For the main domain: in the
/public_html/folder. -
For addon domains or subdomains: in the corresponding folder inside
public_html(e.g./public_html/example.com/).
How to modify PHP settings via cPanel
-
Log in to cPanel.
-
Select File Manager.
-
Go to the
public_htmlfolder or your domain's folder. -
Locate the
.htaccessfile.-
If it does not exist, create it (New File → .htaccess).
-
-
Download a copy of
.htaccess(right-click → Download) before every change, so you can restore it if something goes wrong. -
Right-click → Edit.
-
Add the lines you need.
Examples of PHP settings you can change
max_execution_time 120 means 120 seconds.
Tip: If the value you set exceeds the limit of your plan, the plan limit applies.
Frequently Asked Questions
Why do I see Error 500 after the change?
An Internal Server Error (500) usually means a syntax error in .htaccess or a value that is not allowed. Restore the copy you downloaded or remove the last lines you added. If the error persists, open a ticket with Konet support.
Can I change settings with php.ini or user.ini?
No, php.ini and .user.ini do not apply. At Konet, PHP settings are changed from the CloudLinux PHP Selector (Select PHP Version → Options) or through .htaccess, as the MultiPHP INI Editor guide also explains.
Why isn't the setting I added being applied?
It most likely exceeds your plan's limit. For custom needs, contact Support.
Can I have different settings on subdomains?
Yes. Create a .htaccess file in each subdomain's folder and add the settings there.
Useful Links