Getting 500 Internal Server Error from Duplicating a WordPress Site with Wordfence


If you duplicate a WordPress site that has Wordfence installed on it and are getting a 500 error, you may need to remove some code that Wordfence puts into the .htaccess and .user.ini files.

Go into the site's files either using an FTP program like FileZilla or using your cPanel's File Manager. If you're using File Manager, you may need to have hidden files show. You can change this in the Settings > Show Hidden Files (dotfiles).

In the .htaccess file, remove everything in between, "# Wordfence WAF" and "# END Wordfence WAF".
In the .user.ini file, remove everything in between, "; Wordfence WAF" and "; END Wordfence WAF".

Did you find this article useful?