# Redirecting new users to a default page on WordPress

> Send newly registered WordPress users to a welcome page or other default page by adding a short PHP function to your theme.

Source: https://helpcenter.ruachost.com/wordpress/guides/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.

## Why Redirect New Users?

- Guides users to important content immediately after registration.
- Improves onboarding experience.
- Increases conversions by directing users to a call‑to‑action page.

## Steps to Redirect New Users

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.

## Important Notes

- 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.
