PHPackages                             phpcuong/magento2-redirect-customer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. phpcuong/magento2-redirect-customer

ActiveMagento2-module

phpcuong/magento2-redirect-customer
===================================

Redirect Customer to the particular page after Logging in successfully

2.3.1(6y ago)14357[2 issues](https://github.com/php-cuong/magento2-redirect-customer/issues)OSL-3.0PHPPHP 5.6.\*|7.0.\*|7.1.\*|7.2.\*

Since Jan 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/php-cuong/magento2-redirect-customer)[ Packagist](https://packagist.org/packages/phpcuong/magento2-redirect-customer)[ RSS](/packages/phpcuong-magento2-redirect-customer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Magento 2 Redirect the customer to a custom page after logging in
=================================================================

[](#magento-2-redirect-the-customer-to-a-custom-page-after-logging-in)

By default, Magento 2 provides us with a feature, that allows redirecting the customer to account dashboard after logging in, you can enable this feature by going to Stores → Settings → Configuration → Customers → Customer Configuration → Login Options

Set the field named "Redirect Customer to Account Dashboard after Logging in" to Yes

This feature is working perfectly, however, Magento 2 doesn't support to redirect the customer to a particular page after logging in, if your project requires to use this feature, today I show you the best codes to complete your task.

So what will we do in this practice?

1. We will create a new module called PHPCuong\_CustomerRedirecting
2. We will create an additional field saves the custom page in the configuration
3. We will use the event named customer\_login to redirect the customer to that custom page after logging in successfully

Before doing this practice, you need to understand, How to use events and observers in Magento 2, if you don't watch the video about this lesson yet, you can watch it here

Step 1: Declaring the new module called PHPCuong\_CustomerRedirecting
---------------------------------------------------------------------

[](#step-1-declaring-the-new-module-called-phpcuong_customerredirecting)

- Create the namespace PHPCuong in the path app\\code
- Create the module named CustomerRedirecting in the path app\\code\\PHPCuong
- Create the file named registration.php in the path app\\code\\PHPCuong\\CustomerRedirecting
- Create the file named module.xml in the path app\\code\\PHPCuong\\CustomerRedirecting\\etc

Step 2: Create an additional field saves the custom page in the configuration
-----------------------------------------------------------------------------

[](#step-2-create-an-additional-field-saves-the-custom-page-in-the-configuration)

- Create the new file named system.xml in the path app\\code\\PHPCuong\\CustomerRedirecting\\etc\\adminhtml

Step 3: Subscribing to the event named customer\_login
------------------------------------------------------

[](#step-3-subscribing-to-the-event-named-customer_login)

- Create the new file named events.xml in the path app\\code\\PHPCuong\\CustomerRedirecting\\etc\\frontend
- Create the new file named CustomerLogin.php in the path app\\code\\PHPCuong\\CustomerRedirecting\\Observer

Step 4: Test and see the results
--------------------------------

[](#step-4-test-and-see-the-results)

1. Run the following command lines: php bin/magento setup:upgrade --keep-generated
2. Test the results Go to the Magento Admin Panel → Stores → Settings → Configuration → Customers → Customer Configuration → Login Options Set the custom page.

See the video about this tutorial
---------------------------------

[](#see-the-video-about-this-tutorial)

1. Youtube: [https://www.youtube.com/watch?v=oyPD3Jy17EA&amp;list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ&amp;index=45](https://www.youtube.com/watch?v=oyPD3Jy17EA&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ&index=45)
2. Facebook:

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~849 days

Total

2

Last Release

2553d ago

PHP version history (2 changes)2.1.0PHP ~5.6.0|7.0.2|~7.0.6

2.3.1PHP 5.6.\*|7.0.\*|7.1.\*|7.2.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f7bc25983eb7357a3f984a2d831cbee0752dc43ff33c95910d6fbc834a7ddfb?d=identicon)[PHPCuong](/maintainers/PHPCuong)

---

Top Contributors

[![cuongnqgg](https://avatars.githubusercontent.com/u/160448994?v=4)](https://github.com/cuongnqgg "cuongnqgg (10 commits)")[![php-cuong](https://avatars.githubusercontent.com/u/13449271?v=4)](https://github.com/php-cuong "php-cuong (6 commits)")

---

Tags

magento-2-extensionmagento2-redirect-customerredirect-customermagento 2Magento 2 Extension FreeCustomer LoginRedirect CustomerRedirect Customer to the particular page after Logging in successful

### Embed Badge

![Health badge](/badges/phpcuong-magento2-redirect-customer/health.svg)

```
[![Health](https://phpackages.com/badges/phpcuong-magento2-redirect-customer/health.svg)](https://phpackages.com/packages/phpcuong-magento2-redirect-customer)
```

###  Alternatives

[magepal/magento2-gmailsmtpapp

Magento 2 SMTP Extension - Configure Magento 2 to send all transactional email using Gmail, G Suite, Amazon SES, Office360, Mailgun, SendGrid, Mandrill or any other SMTP servers

3321.8M2](/packages/magepal-magento2-gmailsmtpapp)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[magepal/magento2-form-field-manager

Customer and Address Form Fields Manager for Magento2

293.8k](/packages/magepal-magento2-form-field-manager)[mage-os/module-admin-activity-log

The Admin Activity extension makes it easy to track all admin activity with comprehensive audit logging.

261.4k](/packages/mage-os-module-admin-activity-log)[magevision/module-admin-category-product-thumbnail

Admin Category Product Thumbnail Extension for Magento 2

115.2k](/packages/magevision-module-admin-category-product-thumbnail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
