Title: Php.ini file?
Last modified: August 21, 2016

---

# Php.ini file?

 *  Resolved [kate.t](https://wordpress.org/support/users/katet-1/)
 * (@katet-1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/)
 * I have activated the really cool NinjaFirewall.
    There is this part that says:
 * > I will add the following red lines of code to your /home/jibberish/public_html/
   > mysite/php.ini file. All other lines, if any, are the actual content of the
   > file :
   >     ```
   >     ; BEGIN NinjaFirewall
   >     auto_prepend_file = /home3/yrqvp5a2/public_html/testing/wp-content/plugins/ninjafirewall/lib/firewall.php
   >     ; END NinjaFirewall
   >     ```
   > 
 * NinjaFirewall had to help me create a php.ini file that wasn’t previously there.
   
   Should it be a concern? Given that my host i.e. hostgator already have a php.
   ini file for me, just that its not in the public_html area
 * Also, after I clicked on Apply Changes -> Test Configuration, it goes back to
   the former page that says Enough of Chit Chat Lets Go.
    Didn’t get to reach the
   other settings on NinjaFirewall like shown in screenshots.
 * [http://wordpress.org/plugins/ninjafirewall/](http://wordpress.org/plugins/ninjafirewall/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565286)
 * Hi,
 * You mentioned 2 different user accounts: /home/**jibberish**/ and /home3/**yrqvp5a2**/.
   
   Unless this is a typo, you cannot use the PHP INI file from one account with 
   another one.
 * According to [Hostgator doc](https://support.hostgator.com/articles/what-is-php-ini),
   it seems you need to use the php.ini file that is located above the /public_html/
   folder.
    You would need to: -copy the code added by NinjaFirewall to the /public_html/
   php.ini and paste it into the hostgator php.ini. -delete the /public_html/php.
   ini file created by NinjaFirewall. -edit the /public_html/.htaccess so that the`
   SetEnv PHPRC` line points to the new php.ini. It may take a couple of minutes
   before your server applies the new changes. Then click on the NinjaFirewall menu
   to see whether it is loaded or not.
 * Note that if one day you wanted to delete NinjaFirewall, you would need to **
   remove the changes from the php.ini first**, before deleting it from the WordPress
   plugin page otherwise your site would crash.
 *  Thread Starter [kate.t](https://wordpress.org/support/users/katet-1/)
 * (@katet-1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565424)
 * Now that you mentioned it, I noticed I have 2 php.ini files and 3 .htaccess files
   in the public_html folder
 * Should I delete the extra php.ini and .htaccess files?
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565431)
 * I would only keep the Hostgator php.ini and the main public_html/.htaccess.
    
   If you want to know which php.ini is/are being used by your site, you can upload
   a [phpinfo.php file](http://th1.php.net/phpinfo) in the public_html folder and
   call it from your browser
 *  Thread Starter [kate.t](https://wordpress.org/support/users/katet-1/)
 * (@katet-1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565452)
 * Thank you for being so patient with me thus far.
 * I’m very close to setting it all up already, I’ve deleted the extras .htaccess
   and php.ini and found the actual php.ini
 * I opened up the php.ini and it looks super intimidating.
    I just want to double
   check on where should I add the 3 lines of NinjaFireWall code? On top? Below?
   or anywhere will do?
 *  Thread Starter [kate.t](https://wordpress.org/support/users/katet-1/)
 * (@katet-1)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565455)
 * I took the plunge and added the 3 line code to the bottom of the php.ini file.
 * Worked!
 * Thanks! You are fantastic

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Php.ini file?’ is closed to new replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [kate.t](https://wordpress.org/support/users/katet-1/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/phpini-file-3/#post-4565455)
 * Status: resolved