Joomla CLI & console changes: Joomla 3 → 4, 5 and 6
5 issues in this guide
CLI entry points changed shape when application classes became abstract. This guide groups 5 entries: class MyCli extends JApplicationCli, JApplicationCli, JApplicationDaemon, JCli, JDaemon. In Joomla 4+ you extend CliApplication (or the daemon application) and implement protected doExecute() — custom execute() methods you invented on J3 are not the contract. Import Joomla\CMS\Application\CliApplication (or DaemonApplication) and drop JCli / JDaemon globals. Pair CLI work with the Input guide's JInputCli entry if you still read argv through the old input class. Hop mix: 1 at Joomla 3 → 4; 4 at Joomla 5 → 6. Because these are aliases until native Joomla 6, a cron script can look fine on Joomla 5 with the BC plugin and fatal the night you turn the plugin off. Run every CLI script once on staging with Behaviour – Backward Compatibility disabled before the Joomla 6 cutover, using the before/after blocks below. Catalog replacements in this guide include class MyCli extends JApplicationCli → CliApplication + doExecute(); JApplicationCli → Joomla\CMS\Application\CliApplication; JApplicationDaemon → Joomla\CMS\Application\DaemonApplication; JCli → Joomla\CMS\Application\CliApplication. Open each h2 anchor for the full before/after, fix list, and error strings shipped in the reference data.
APP-CLI-DOEXECUTE-001
class MyCli extends JApplicationCli
JApplicationCli is abstract — implement doExecute()
CliApplication (and WebApplication) are abstract in Joomla 4+. The entry point is doExecute(), not a custom execute() you invent.
class MyCli extends JApplicationCli → CliApplication + doExecute()
Dies at Joomla 3 → 4What you will see
- Cannot instantiate abstract class
- Class ... contains 1 abstract method and must therefore be declared abstract
Symptoms people search
CLI script abstract class · doExecute
Replace this code
Swap class MyCli extends JApplicationCli for CliApplication + doExecute().
Joomla 3
Remove or stop calling this
class LmsCli extends JApplicationCli {
public function execute() { /* old */ }
}Joomla 4 / 6
Use this instead
class LmsCli extends \Joomla\CMS\Application\CliApplication {
protected function doExecute(): void { /* your CLI work */ }
}How to fix it
- 1Implement protected doExecute().
- 2Do not instantiate CliApplication directly.
Also known as
doExecute · CliApplication abstract · JApplicationWeb abstract
JAPPLICATIONCLI-CLASS-001
JApplicationCli
JApplicationCli class name
JApplicationCli is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JApplicationCli" not found.
JApplicationCli → Joomla\CMS\Application\CliApplication
Dies at Joomla 5 → 6What you will see
- Class "JApplicationCli" not found
- Class 'JApplicationCli' not found
- Failed to open stream: JApplicationCli
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JApplicationCli for Joomla\CMS\Application\CliApplication.
Joomla 3
Remove or stop calling this
JApplicationCli::getInstance();
// or new JApplicationCli()Joomla 4 / 6
Use this instead
use Joomla\CMS\Application\CliApplication;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Application\CliApplication.
- 2Replace every JApplicationCli with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JApplicationCli · Joomla\CMS\Application\CliApplication · class alias · J prefix · JCli
JAPPLICATIONDAEMON-CLASS-001
JApplicationDaemon
JApplicationDaemon class name
JApplicationDaemon is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JApplicationDaemon" not found.
JApplicationDaemon → Joomla\CMS\Application\DaemonApplication
Dies at Joomla 5 → 6What you will see
- Class "JApplicationDaemon" not found
- Class 'JApplicationDaemon' not found
- Failed to open stream: JApplicationDaemon
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JApplicationDaemon for Joomla\CMS\Application\DaemonApplication.
Joomla 3
Remove or stop calling this
JApplicationDaemon::getInstance();
// or new JApplicationDaemon()Joomla 4 / 6
Use this instead
use Joomla\CMS\Application\DaemonApplication;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Application\DaemonApplication.
- 2Replace every JApplicationDaemon with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JApplicationDaemon · Joomla\CMS\Application\DaemonApplication · class alias · J prefix · JDaemon
JCLI-CLASS-001
JCli
JCli class name
JCli is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JCli" not found.
JCli → Joomla\CMS\Application\CliApplication
Dies at Joomla 5 → 6What you will see
- Class "JCli" not found
- Class 'JCli' not found
- Failed to open stream: JCli
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JCli for Joomla\CMS\Application\CliApplication.
Joomla 3
Remove or stop calling this
JCli::getInstance();
// or new JCli()Joomla 4 / 6
Use this instead
use Joomla\CMS\Application\CliApplication;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Application\CliApplication.
- 2Replace every JCli with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JCli · Joomla\CMS\Application\CliApplication · class alias · J prefix
JDAEMON-CLASS-001
JDaemon
JDaemon class name
JDaemon is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JDaemon" not found.
JDaemon → Joomla\CMS\Application\DaemonApplication
Dies at Joomla 5 → 6What you will see
- Class "JDaemon" not found
- Class 'JDaemon' not found
- Failed to open stream: JDaemon
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JDaemon for Joomla\CMS\Application\DaemonApplication.
Joomla 3
Remove or stop calling this
JDaemon::getInstance();
// or new JDaemon()Joomla 4 / 6
Use this instead
use Joomla\CMS\Application\DaemonApplication;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Application\DaemonApplication.
- 2Replace every JDaemon with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JDaemon · Joomla\CMS\Application\DaemonApplication · class alias · J prefix