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
-
Log in to WordPress with an administrator account.
-
In the dashboard, go to Appearance → Theme Editor.
-
Select your active theme and open the functions.php file.
-
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
/welcomewith the slug of the page you want new users to see. -
Example:
/blogor/thank-you.
-
-
Save the file.
-
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.