• Resolved ketanco

    (@ketanco)


    when i moved to new host the site didnt work. my host told me it is because .user.ini file because it had the old path in it
    so they disabled that file by renaming it to .user.ini.bak
    and site works
    now i installed wordfence again to the site which is under new hosting now
    and firewall of wordfence is on too and it seems working
    but wordfence didnot create another .user.ini file
    so if that file was necessary before, why is it not necessary now?

Viewing 3 replies - 1 through 3 (of 3 total)
  • When you go through the steps to activate the Wordfence firewall, Wordfence creates a php.ini file (similar to user.ini but for Wordfence on your new host).
    That file contains a path to the wordfence-waf.php file.
    And your .htaccess file should have been updated with a line at the top that gives the path to the php.ini file.
    For example:
    .htaccess line added to top:
    SetEnv PHPRC /home/username/public_html/php.ini
    The php.ini files contains

    auto_prepend_file = '/home/username/public_html/wordfence-waf.php'
    zend_extension=/usr/local/php72/lib/php/extensions/ioncube.so
    zend_extension=/usr/local/php72/lib/php/extensions/ZendOptimizer.so
    

    The wordfence-waf.php file contains

    
    <?php
    if (file_exists('/home/username/public_html/wp-content/plugins/wordfence/waf/bootstrap.php')) {
    	define("WFWAF_LOG_PATH", '/home/username/public_html/wp-content/wflogs/');
    	include_once '/home/username/public_html/wp-content/plugins/wordfence/waf/bootstrap.php';
    }
    ?>
    
    Thread Starter ketanco

    (@ketanco)

    ok thanks but i didnt understand. what must i do?
    there was a working .user.ini file before.
    now there is only .user.ini.bak file. but wordfence and site is tsill working. or something is not working which i do not even notice? or what must i do?

    Hi @ketanco,

    Wordfence will create a user.ini, php.ini, or .htaccess based on your web software.

    So as long as you see one of these files in your document root, you should be good to go!

    Dave

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.user.ini file’ is closed to new replies.