• Resolved SRD75

    (@srd75)


    Hi,

    I moved my https://www.example.com site to staging.example.com. This involved copying the contents of /home/example/public_html to /home/example/staging.example.com

    When I load staging.example.com, I receive the error:

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

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

    I have replaced the contents of /home/example/staging.example.com/wordfence-waf.php with:

    <?php
    // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
    
    if (file_exists('/home/example/staging.example.comu/wp-content/plugins/wordfence/waf/bootstrap.php')) {
    	define("WFWAF_LOG_PATH", '/home/example/staging.example.com/wp-content/wflogs/');
    	include_once '/home/example/staging.example.com/wp-content/plugins/wordfence/waf/bootstrap.php';
    }
    ?>

    however, the error remains.

    I have searched the database and files in /home/example/staging.example.com for instances of public_html and fine nothing.

    I have cleared the browser cache and the issue remains. There is no server cache or CDN.

    Help appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi srd75,

    Take a look at our Migrating Wordfence documentation. Hopefully this will give you some insight on what is going on. Adding the Wordfence Firewall feature has created some complexity in moving sites that have the Firewall enabled. We are exploring options to add in the future that will help in these situations.

    • This reply was modified 8 years, 5 months ago by wflandon.
    Thread Starter SRD75

    (@srd75)

    Excellent. Thanks. I needed to edit the path to wordfence-waf.php in .htaccess

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move WWW to Staging, receive Wordfence error’ is closed to new replies.