Title: auto prepend file
Last modified: August 31, 2016

---

# auto prepend file

 *  Resolved [modiphier](https://wordpress.org/support/users/modiphier/)
 * (@modiphier)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/)
 * Hello,
 * I have copied a php.ini file to my root directory. this is an inmotion dedicated
   server.. phpinfo is showing the prepended file path yet the warning notice will
   not go away.
 * Thanks,
    Paul
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

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

 *  Thread Starter [modiphier](https://wordpress.org/support/users/modiphier/)
 * (@modiphier)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270730)
 * Just tried adding to my htaccess file and still not making warning go away..
   
   Tried it with and without php.ini at the end as per instructions found on the
   [https://docs.wordfence.com/en/Web_Application_Firewall_Setup](https://docs.wordfence.com/en/Web_Application_Firewall_Setup)
   page
 * SetEnv PHPRC /home/public_html/mydot.com/
 *  [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270755)
 * I’m having the same problem where the configuration message won’t go away despite
   having the correct code in .htaccess and php.ini.
 *  [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270832)
 * I found a fix that works for me. The code that Wordfence adds to the htaccess
   was enclosed in an IfModule statement. When I removed that IfModule statement
   so it was just php_value then it works.
 *  Thread Starter [modiphier](https://wordpress.org/support/users/modiphier/)
 * (@modiphier)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270833)
 * I don’t see any change to my htaccess file so there is nothing to remove as you
   describe..
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule
   ^index\.php$ – [L] RewriteRule ^site-admin/?$ /wp-login.php [QSA,L] RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.
   php [L] </IfModule>
 * # END WordPress
 *  Thread Starter [modiphier](https://wordpress.org/support/users/modiphier/)
 * (@modiphier)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270840)
 * Ok, so i poked around a few of the other sites I have updated and I did find 
   the code and once I added it to my htaccess the configure warning message went
   away.. Must be an issue where it doesn’t write to htaccess if php.ini part fails
   on initial setup..
 * # Wordfence WAF
    <IfModule mod_suphp.c> suPHP_ConfigPath ‘/home/public_html/mydot.
   com’ </IfModule> <Files “.user.ini”> <IfModule mod_authz_core.c> Require all 
   denied </IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all
   </IfModule> </Files>
 * # END Wordfence WAF
 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270934)
 * Hi modiphier,
 * Thanks for the details — we’ll look at automating this in a future version, or
   including it in the documentation if it may not be possible on some sites.
 * [@wpdev999](https://wordpress.org/support/users/wpdev999/): Thanks also for the
   input!
 * -Matt R
 *  [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270952)
 * [@wfmattr](https://wordpress.org/support/users/wfmattr/)
    Just for reference,
   the host for the site in question uses CloudLinux to manage PHP. It doesn’t support
   php.ini or .user.ini. Any PHP variables should be added to .htaccess.
 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270953)
 * Hi wpdev999,
 * Thanks for the additional details — I checked with the dev team, and it looks
   like we may just need to change the IfModule directive to use mod_lsapi instead
   of mod_php5 in this case, so we can likely cover this in one of the upcoming 
   releases. Thanks!
 * -Matt R
 *  [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270959)
 * Sounds good.

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

The topic ‘auto prepend file’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/auto-prepend-file/#post-7270959)
 * Status: resolved