How to Redirect your 404 page to the Home Page in WordPress?

Go to the root of your template, check if there is 404.php or not. If you can not find this file, just create one, then edit  404.php, add the following code:

header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(‘url’));

Done! Simple ? Yes!

I have tested the code for