• Resolved deckermax16188

    (@deckermax16188)


    Hi there! So I have a little issue with Wordfence.

    Background:
    I have set up a master WP setup on one of my subdomains which I duplicate with the Duplicator plugin (https://de.ww.wp.xz.cn/plugins/duplicator)

    One of the standard plugins that I have installed on it is Wordfence.

    Every time I create a new website I duplicate the master setup, install it on a subdomain, finish the website and then move it to the clients webspace.

    Today I wanted to move the finished website to the clients webspace, ran the Duplicator installation and tried to log in to the newly created website but got this error:

    Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

    Fatal error: Unknown: Failed opening required ‘/www/htdocs/w0163357/MASTERWPSUBDOMAIN/wordfence-waf.php’ (include_path=’.:/opt/plesk/php/7.4/share/pear’) in Unknown on line 0

    MASTERWPSUBDOMAIN is the subdomain on which the WP master set up is installed.

    This is the first time I ran into this error and it didn’t let me access the freshly installed website.

    I tried deleting the Wordfence plugin on all installations, deleted all database rows relevant to Wordfence on all installations and nothing worked.

    I can not access the newly installed website.

    What can I do?

    By the way, when I deleted MASTERWPSUBDOMAIN/wordfence-waf.php ALL websites that used the master set up crashed and I had to install a backup to get them to work again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @deckermax16188, thanks for your message.

    When removing wordfence-waf.php, the sites will likely have crashed because when optimized, the auto_prepend_file directive in their .htaccess/.user.ini file is looking for it before any page content is served to the browser. Removing that line to stop the sites looking for the file could have resolved it by the looks of things.

    Also along those lines, the original Unknown: Failed opening required error suggests that the path to wordfence-waf.php specified in the auto_prepend_file line may be incorrect to begin with. This is most commonly seen in site migrations or when moving an optimized version of Wordfence from a development to live environment.

    An easy fix would be to find auto_prepend_file = '‘/www/htdocs/w0163357/MASTERWPSUBDOMAIN/wordfence-waf.php' in your .htaccess/.user.ini files for any affected sites and remove it. Your Wordfence installations would then revert back to basic protection, but using the optimization wizard from your Wordfence dashboard should then reinstate the optimization with the current correct path to wordfence-waf.php.

    There is also more information around this here: https://www.wordfence.com/help/advanced/remove-or-reset/#migrate-with-wordfence

    Let me know if you continue to have issues after manually taking action, as there may be other elements of your environment/configuration to take into account in order to get Wordfence running in an optimized state. For example, WP Engine don’t use .htaccess, so optimization is performed differently.

    Thanks,

    Peter.

    Derek

    (@uncomman357)

    I have the same problem.

    My smartphone was stolen and I lost the authentication app for 2FA for this site, so could not authenticate when logging in. I checked online and used the advice given in many places, i.e. to rename or remove the Wordfence folder, remove the references to wordfence in the .user.ini, and removed the file wordfence-waf.php in the root folder.

    Having removed all links to Wordfence and removed the plugin, I now get this (from my error log):

    PHP Fatal error: Unknown: Failed opening required ‘/home/xtajaiph/public_html/wordfence-waf.php’ (include_path=’.:/usr/local/php74/lib/php’) in Unknown on line 0

    Where is it getting the call to this file, since I removed it from user.ini and there isn’t an auto_prepend command in the .user.ini OR the .htaccess file?

    I now cannot login?

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

The topic ‘Fatal error: Unknown: Failed opening required’ is closed to new replies.