How to return 404 when called edit-comments.php?
There are several ways you can approach this. I wouldn’t recommend deleting edit-comments.php as this is changing the core files, and your changes will be lost when you update WordPress. htaccess 301 Redirect /wp-admin/edit-comments.php http://www.example.com/wp-admin/ OR functions.php Part 1 // Redirect any user trying to access comments page function custom_disable_comments_admin_menu_redirect() { global $pagenow; if ($pagenow … Read more