• Use SITEGROUND for my host for 2 websites. Main and Second site.
    Had issue getting WordFence firewall to work on Second site; php variables manager didn’t work or I screwed something up. So I manually created php.ini and .htaccess in second site directory.

    Followed documentation for SiteGround to use the “php variables manager” in Cpanel to add lines to the php.ini. THIS WORKED ON MAIN SITE.

    For second site, since it is a subdirectory of the first site I had trouble. I had to manually create the php.ini file and add a line to .htaccess.

    ISSUE: both firewalls seem to be working, but the php.ini files are slightly different for each. DOES THIS MATTER??

    Site #1 php.ini looks like this:

    auto_prepend_file = “/home/MYDIR/public_html/wordfence-waf.php”
    zend_extension=/usr/local/php70/lib/php/extensions/ioncube.so
    zend_extension=/usr/local/php70/lib/php/extensions/ZendOptimizer.so

    Site #2 php.ini (that I had to manually create php.ini for) looks like this:

    auto_prepend_file = “/home/MYDIR/public_html/MYSECONDSITE.com/wordfence-waf.php”

    I also added this line – per instructions – in .htaccess file of MYSECONDSITE.com directory:
    # Wordfence WAF
    SetEnv PHPRC /home/MYDIR/public_html/MYSECONDSITE.com/php.ini
    # END Wordfence WAF

    I just want to make sure I didn’t screw anything up as the directions were a little unclear to this WordPress Newbie. THANKS! Had a LOT of hacking issues before I installed WordFence. I will probably purchase premium version after I evaluate it for a while longer.

  • The topic ‘Did I correctly add lines to PHP.INI for a second install of WordFence plugin?’ is closed to new replies.