• Resolved omahoung

    (@omahoung)


    Hi,

    I migrated a website from a server to another one. In the htaccess file I had this code coming from Wordfence plugin:

    # Wordfence WAF
    <Files ".user.ini">
    	<IfModule mod_authz_core.c>
    		Require all denied
    	</IfModule>
    	<IfModule !mod_authz_core.c>
    		Order deny,allow
    		Deny from all
    	</IfModule>
    </Files>
    
    # END Wordfence WAF

    Do I have to copy paste this code in the new server file? Or will this be automatically reinserted by the plugin if needed?

    Thank you.

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

    (@wfpeter)

    Hi @omahoung, thanks for reaching out.

    This code can sometimes be added if a scan result flags that your .user.ini file is publicly visible, so there’s no harm in manually returning it to the live version of your .htaccess.

    When migrating, it’s also a good idea to return to basic protection and re-optimizing the firewall on the live site to prevent loading issues with an incorrect auto_prepend_file path: https://www.wordfence.com/help/advanced/remove-or-reset/#migrate-with-wordfence

    Thanks,
    Peter.

    Thread Starter omahoung

    (@omahoung)

    Inserting again the extended protection has re-created the code.

    Thanks for the migration information.

    Plugin Support wfpeter

    (@wfpeter)

    No worries @omahoung, thanks for the update. If you have further Wordfence questions in the future just open up a new topic and we’ll be glad to assist!

    Peter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Website migration’ is closed to new replies.