• Resolved basis104

    (@basis104)


    Hi,

    There was a topic on the Duplicator Plugin two years ago in this forum but with no specific answer. Link to Duplicator: https://de.wordpress.org/plugins/duplicator/

    As I run all my WP sites with NFW and also clone them with Duplicator to new servers, a solution would be a big time saver. So far even after stopping NFW and disabling the plugin I keep getting this error when running the Duplicator Installer on the target server:

    Fatal error: Unknown: Failed opening required ‘/home/USER/public_html/wp-content/plugins/ninjafirewall/lib/firewall.php’ (include_path=’.:/opt/alt/PHPVERSION/usr/share/pear’) in Unknown on line 0

    Only solution is to uninstall NFW, then create a Duplicator package and run the Installer on the target server, then re-installing NFW from scratch on the source server.

    Any hint will be appreciated a lot. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    As indicated in the FAQ, you need to export its configuration and uninstall it, and then reinstall and reimport its configuration. The problem is that it makes use of absolute paths (in the PHP INI and the firewall loader script) and because the remote server may not use the exact same paths, it will not work and return an error such as the one you posted in your message. We cannot use relative paths.

    Thread Starter basis104

    (@basis104)

    Hi,

    Thanks. So this basically means it’s impossible to make a Duplicator package (which is simply a ZIP file with all Data and Database) without uninstalling NFW completely?

    According to your message, however, I suspect that it might be possible to manually change the paths in the mySQL dump file? Or simply delete some stuff inside the dump in order to be able to make a clean deployment on the target server?

    Plugin Author nintechnet

    (@nintechnet)

    In “Full WAF” mode, absolute paths are located either in the .htaccess or PHP INI.
    In “WP WAF” mode, in the wp-config.php script.
    In both modes, there is also the firewall path located in thewp-content/nfwlog/ninjafirewall.php script.

    If you change those paths, you would also need to log in to WordPress, go to the “Firewall Policies” and simply click on the “Save Firewall Policies” button, because the firewall will need to adjust some rules and policies according to the new paths on the server.

    Thread Starter basis104

    (@basis104)

    Hi,

    Thanks. So the answer to the main question “is it impossible to make a working Duplicator package without uninstalling NFW completely first?”

    … is “YES, it’s impossible”, I guess?

    Plugin Author nintechnet

    (@nintechnet)

    I’m not familiar with Duplicator so I cannot really say, but I think it is much simpler and easier to reinstall it and reimport its configuration. It is safer and more reliable too (e.g., the PHP interpreter on the destination server may not use the same INI files etc).
    You can still copy the wp-content/nfwlog/ folder if you want to keep the logs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicator Plugin and NFW’ is closed to new replies.