Skip to content

Redirecting new users to a default page on WordPress

When new users register on your WordPress site, you may want them to land on a specific page (e.g., a welcome page, blog section, or thank‑you page). On ruachost.com, this can be achieved by adding a simple PHP function to your theme.

  • Guides users to important content immediately after registration.
  • Improves onboarding experience.
  • Increases conversions by directing users to a call‑to‑action page.
  1. Log in to WordPress with an administrator account.

  2. In the dashboard, go to Appearance → Theme Editor.

  3. Select your active theme and open the functions.php file.

  4. Add the following code snippet:

    // Redirect new users to a default page after registration
    function ruachost_redirect_new_users() {
    return home_url('/welcome'); // change '/welcome' to your desired page slug
    }
    add_filter('registration_redirect', 'ruachost_redirect_new_users');
    • Replace /welcome with the slug of the page you want new users to see.
    • Example: /blog or /thank-you.
  5. Save the file.

  6. Test by registering a new user → They will be redirected to the specified page.

  • Always back up your theme before editing functions.php.
  • Use a child theme to preserve changes during updates.
  • Ensure the target page exists and is published.