• Hello,

    When migrating a Wordfence-protected website to a new domain with Duplicator, Wordfence keeps looking for vhosts/old_domain/htdocs/wordfence-waf.php, which causes a PHP Fatal error, and a white screen on the front-end and the back-end of the website.

    Curiously, the migration went well at first (one week ago), and the PHP Fatal errors only started yesterday.

    De-activating the plugin through FTP does not help, since this wordfence-waf.php file is apparently called from other parts (user.ini, php.ini, database?)

    I was able to get my site up again by deleting the website and installing a backup, so this is not an urgent topic, but could you please tell me

    • if this issue is known,
    • if there is a way around.

    In any case, it might be useful to warn the users.

    Best regards, and thank you for making this powerful plugin available for free.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am having basically the same issue using Duplicator to ‘clone’ a website since the WF firewall was introduced. I have submitted a support ticket but have not had a response yet.

    I am certainly hoping to find a solution as WF and Duplicator are 2 of my most important plugins.

    Thread Starter Kasutan

    (@kasutan)

    Hello MLeeC,

    sorry I did not see your ticket or I would have posted there.

    My “solution” for the moment it to remove completely Wordfence from the website before building the package with Duplicator.
    By completely, I mean using the “Delete Wordfence tables and data on deactivation?” option and removing manually /htdocs/wordfence-waf.php and /wp-content/wf-logs/.

    Of course, this means that I have to install and configure Wordfence again at the new location.

    I hope that a faster solution exists.

    Hello!
    The bootstrapping of the Firewall is done outside of the plugin and this is intentional. It makes the Firewall load before any other code on your website which means you are protected not only against external threats but internal ones as well.

    The error probably came after a week because the Firewall was set to automatically enable after a week?

    Where the Wordfence WAF “auto_prepend_file” directive is depends on your server setup. It will typically be in .htaccess or .user.ini. You can modify the paths there to reflect the new environment that your files are living in. You might have to do the same in wordfence-waf.php if the file structure has changed.

    I’m not sure if that was the issue though or if the Duplicator simply did not copy the file “wordfence-waf” over?

    Thread Starter Kasutan

    (@kasutan)

    Hello wfasa,

    thank you for answering so quickly – this is indeed a great plugin ??
    Duplicator does copy the wordfence-waf file, but there is indeed an absolute path encoded inside, as well as in user.ini.
    Modifying those two files apparently solves the issue.
    Thanks again!

    Thanks Kasutan,
    we have a couple more reports like this now and are looking in to possible solutions so that the paths don’t have to be modified manually in the future.

    I have the same issue. I get a 504 Gateway Time-out error. I changed the absolute path of the website both in user.ini and wordfence-waf.php, but nothing changed.

    Hello alevalentini,
    504 Gateway Time-out doesn’t sound like the same issue. If you remove the .user.ini does your site load properly?

    Encountered the same issue on my self hosted server. By moving the wordfence plugin folder which deactivated the plugin the sites were available again. Though, the firewall causes quite some trouble. Even by dismissing the notice to activate it, it get activated anyway. I banged my head against the wall at the airport on go live of a website until I noticed this inconvenient behavior.

    Hi mike,
    the Firewall can not optimize itself. It requires manual action. However, being activated and optimized are not the same things. What are you seeing on the Firewall page, does it say “extended” or “basic” protection? If it says “extended” it means that your Firewall is optimized.

    If you are not able to disable the Firewall it could be due to an inability to write to the database to update options or it could be some cache plugin interfering.

    Are you still having issues? If so, please elaborate. Thanks!

    I haven’t tried moving a site lately in the default configuration, but here was the method I used to move sites previously when I had this same issue:

    * Disabled the Wordfence Firewall
    * Remove extended protection (at the bottom of the Firewall page)
    * Duplicate the site with Duplicator
    * Re-enable the Firewall and Extended Protection

    Then when I moved the Duplicator files to the new server everything worked perfectly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘PHP Fatal Error when migrated to another domain with Duplicator’ is closed to new replies.