Home / Tutorials / Set Custom php.ini using .htaccess
htaccess

Set Custom php.ini using .htaccess

In share hosting we always face problem to change php.ini settings. Because we can’t access php.ini and hosting provider never change php.ini setting for single user.

So in case we have solutions to use custom php.ini file for our site. Here is steps how to use custom php.ini:

    1. Prepare php.ini : open your php.ini file in text editor from your machine and make changes in setting you need. and then save
    2. Upload php.ini to your hosting server root
    3. add following code to your .htaccess file:

SetEnv PHPRC /your_server_root_path/php.ini
your_server_root_path is generally looks like /home/cpanel_username/public_html/
so code should be like : SetEnv PHPRC /home/codemorning/public_html/php.ini
codemorning is my hosting/cpanel username

 

Feel free to comment here if any doubt or issue 😉

About cmadmin

Web Developer & Designer | Android App Developer

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
%d bloggers like this:
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH