Top 10 Ways To Boost Your WordPress Website Speed
Redirect 404 Error Pages to Home
Got to your WordPress theme directory and edit 404.php file in your WordPress. Let’s add following small PHP script at top of the file. The first line in the script will make the redirection as 301 permanently.
Also you can replace .get_bloginfo(‘url’) with your website domain name to avoid extra request to WordPress to get domain name and make redirection more faster like below.
Finally, test the redirection in your browser window.
How to Disable Comments on Attachments in WordPress