Re-directing old PHP pages to Homepage

I help manage a WordPress website for a client. I came across old website PHP pages from a decade ago and was wondering if there was a straightforward way to re-direct all old PHP pages to the current homepage.

Does this require coding or is there a plugin?

Bear with me as I have no experience with PHP.


  1. put this at the start of PHP pages you want to redirect:

    $homeURL = home_url(‘/’);

  2. Just use Redirection(assuming same domain name) plugin and add the old url slugs then point them to the new page or pages, as you see fit.

    If it’s not the same domain, you use htaccess method on old domain root.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer