How to auto redirect to the front page after login

Sometimes I’d like to go straight to my front page after logging in. This is extremely useful with themes like P2 which allow you to post from the front page, but may also come in handy if you don’t want your users to be put off by the admin interface.

There’s a very effective solution built right into WordPress. Usually you’d login with something like this:

This in turn is a shortcut that really calls the actual php file:

To redirect to the front page after login, just change that to

Thanks to Otto for this suggestion in the WordPress forums.

You can either bookmark this link or add it anywhere in your theme so you and your users can access it easily. If you’d like to build it right into a theme and call this via PHP you can make use of functions that generate the correct URLs for you:

More info in the WordPress Codex:

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at and

Add your voice!