• Resolved steve49589

    (@steve49589)


    A couple of years ago, I tried Wordfence and really liked the concept, but it did not play well with the iThemes Backup Buddy plugin.

    I use Backup Buddy to frequently restore a site to a development, stage or test area.

    As an example, I’ll take https://websitename.com and create a new environment https://dev.websitename.com, and restore the complete website using Backup Buddy. This is important as I will test the validity of the backup and be able to install new features/plugins to check for compatibility.

    Previously when Wordfence was installed, I was able to restore a live website that had issues by wiping everything out and restoring the Backup Buddy backup I had. But the real problem was restoring to a sub-domain.

    Does anyone do this? Is this still a problem with Wordfence or is there any documentation on how to successfully restore a backup to a dev/stage environment on a sub-domain when Wordfence is installed? I could not find reference to Backup Buddy in the official documentation anywhere.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @steve49589

    If you restore a backup to a different location on the server and you don’t remove Extended Protection mode from the firewall before the backup was created then a fatal PHP error will be generated on the restored site as the absolute file path of the site has changed. This will result in a blank screen being displayed if the printing of PHP errors is disabled (it should be disabled).

    Look for a .user.ini file or php.ini file in the root directory where the backup has been restored to with the following code as shown in the example below:

    ; Wordfence WAF
    auto_prepend_file = '/absolute/path/to/wordfence-waf.php'
    ; END Wordfence WAF

    If you see this code then remove it.

    If you don’t see the code in either a .user.ini file or php.ini file then look in the .htaccess file for this code as shown in the example below (%d will be a number based on the branch of PHP running on the server):

    # Wordfence WAF
    <IfModule mod_php%d.c>
    php_value auto_prepend_file '/absolute/path/to/wordfence-waf.php'
    </IfModule>
    # END Wordfence WAF

    If you see this code then remove it.

    Is the problem now solved?

    If it is resolved then you will also need to delete the wordfence-waf.php file in the root directory where the backup has been restored to.

    You can then proceed to optimize the firewall again with the correct absolute file path.

Viewing 1 replies (of 1 total)
  • The topic ‘Compatible with iThemes Backup Buddy?’ is closed to new replies.