If you build Joomla sites for a living, these habits save the most trouble. They apply to Joomla 5 and Joomla 6, and to one site or fifty.
Never edit core files
A Joomla update will overwrite them. Use a plugin, a template override or a layout override. To make an override, go to System, then Site Templates, select your template and open the Create Overrides tab.
Keep your changes where updates can't reach them
Template updates replace template files, so keep your own work outside them where you can. A child template, available since Joomla 4.1, keeps your changes apart from its parent. Small CSS changes can go in a custom code field. In our templates, that's the header code tab.
Write for the current Joomla
- Use namespaced classes and Joomla's service provider pattern for new extensions.
- Load CSS and JavaScript through the Web Asset Manager.
- Put text in language files, not in your code.
- Check Joomla's developer manual, because it covers the current versions. Old forum answers often don't.
Test on the PHP your clients run
Joomla 6 needs PHP 8.3 or later, and its manual recommends 8.4. Run the same version in development as in production, and keep error reporting on while you work.
Treat input as hostile
Read request data through Joomla's input classes with a filter, use prepared statements for queries, and escape what you print. Check tokens on forms and permissions on every action.
Use version control and a staging copy
Keep your code in Git. Try updates and changes on a copy of the site first, not on the live one. Our Quickstarts include StageIt for this, and Akeeba Backup too.
Choose extensions you can maintain
Every extension is something you'll need to update for years. Check its last release and its Joomla 6 status, and whether it's still supported. See our guide to third-party extensions.
Don't build every front end from nothing
If you build sites for clients, a finished template can cover the part clients see first, while you spend your time on the part only you can do. Our Template Club is $99 for 12 months: every template we sell, plus downloads, updates and support for the year, for up to 5 websites, your own or your clients'. There's no footer link and no rebranding fee, the templates use plain Joomla modules, and you can edit the code.