JROUTER-GETINSTANCE-001

require JPATH_SITE . '/includes/router.php'

JRouter::getInstance() + includes/router.php

Manually including includes/router.php is gone. The router is on the application.

require JPATH_SITE . '/includes/router.php'Autoloaded Router class

Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Failed opening required 'includes/router.php'
  • Call to undefined method JRouter::getInstance

Symptoms people search

SEF router include fatal

Replace this code

Swap require JPATH_SITE . '/includes/router.php' for Autoloaded Router class.

Joomla 3

Remove or stop calling this

require_once JPATH_SITE . '/includes/router.php';
$router = JRouter::getInstance('site');

Joomla 4 / 6

Use this instead

$router = Factory::getApplication()->getRouter();

How to fix it

  1. 1Delete the require.
  2. 2Use $app->getRouter().

Also known as

includes/router.php · JRouter::getInstance

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.