Category: Joomla

  • Joomla php.ini Settings: Recommended Values for Joomla 6.2, 5 & 4 (Tested)

    Joomla php.ini Settings: Recommended Values for Joomla 6.2, 5 & 4 (Tested)

    Updated 15 October 2026 · By Abhilash Sahoo, Founder, Infyways

    Quick answer: as of Joomla 6.2, the latest version (released 13 October 2026), a good starting point for Joomla 6 and 5 is:

    memory_limit        = 256M
    upload_max_filesize = 64M
    post_max_size       = 64M
    max_execution_time  = 120
    max_input_time      = 120
    max_input_vars      = 5000
    output_buffering    = Off
    display_errors      = Off

    Joomla 6.2 needs PHP 8.3.0 or newer (8.4 recommended), and Joomla 5.4 needs PHP 8.1.0 or newer. Check what is actually applied in System → System Information → PHP Settings. Then edit the file your server really reads:

    • .htaccess php_value lines for Apache mod_php
    • .user.ini for CGI, FastCGI or PHP-FPM
    • cPanel’s MultiPHP INI Editor
    • Plesk’s PHP Settings
    • the PHP-FPM pool file on a VPS
    • the main php.ini on XAMPP

    I tested this on a real Joomla 5.4.10 install on XAMPP 8.2.12 (Apache with mod_php, PHP 8.2.12). I changed values with each method and read the results back. The images marked “real output” are screenshots and output from that site. The requirements come from the official Joomla technical requirements, and the directive behaviour comes from the php.net ini reference.

    What PHP version and settings do Joomla 6.2, 5 and 4 need?

    Recommended PHP settings for Joomla 6.2, 5.4 and 4.4
    Requirement Joomla 4.x Joomla 5.x Joomla 6.2 (latest) Source
    PHP minimum 7.2.5 8.1.0 8.3.0 Joomla manual
    PHP recommended 8.2 8.3 8.4 Joomla manual
    Memory limit not stated “at least 256MB” “at least 256MB” Joomla manual
    Required PHP modules json, simplexml, dom, zlib, gd, mysqlnd or pdo_mysql or pdo_pgsql (mbstring recommended) Joomla manual
    output_buffering, display_errors Off (recommended) Joomla installer and update checks
    file_uploads, session.auto_start On, Off Joomla installer and update checks

    Joomla 6.2 (Mwezi) is the current release; its own code enforces JOOMLA_MINIMUM_PHP 8.3.0, and 5.4.10, released the same day, is the last Joomla 5 bugfix release. Joomla 4 reached end of life, so plan your Joomla 6 compatibility check and upgrade. My test site showed this live warning on the dashboard: “Your PHP version, 8.2.12, is only receiving security fixes … Joomla 5 has entered security only mode. Support ends 12 October 2027.”

    Which php.ini values should I set for Joomla?

    Directive PHP default Joomla value Why
    memory_limit 128M 256M (512M for big shops or migrations) Joomla’s documented minimum for 5 and 6. Too low gives “Allowed memory size … exhausted”.
    upload_max_filesize 2M 64M Extension, template and media uploads
    post_max_size 8M 64M (≥ upload_max_filesize) php.net: it “must be larger than upload_max_filesize”, and memory_limit “should be larger than post_max_size”
    max_execution_time 30 120–300 Core updates, backups, imports
    max_input_time -1 120 or -1 Slow uploads
    max_input_vars 1000 3000–5000 Large forms, such as permissions, menus and big article forms, are cut off at 1000
    output_buffering Off (php.ini-production sets 4096) Off Joomla’s installer and updater recommend Off
    display_errors On (php.ini-production sets Off) Off on live sites Don’t show paths to visitors. Use Joomla’s Error Reporting setting for debugging.
    session.auto_start 0 0 Joomla manages its own sessions
    opcache.enable 1 1 Speeds up PHP. If code changes don’t show, check opcache.validate_timestamps.

    The max_input_vars limit is easy to miss. I posted 1,500 form fields to the test site with the default limit. PHP kept the first 1,000, dropped the rest without any visible error, and only logged a warning:

    PHP max_input_vars 1000 limit dropping form fields with Input variables exceeded warning

    If a large Joomla form “saves” but some changes disappear, raise max_input_vars first.

    How do I check my current PHP settings in Joomla?

    In the Administrator, go to System → System Information. The PHP Settings tab shows the values Joomla actually gets, and PHP Information shows the full phpinfo output.

    Joomla 5 System Information PHP Settings tab showing upload size, memory limit and output buffering

    Note what the PHP Settings tab doesn’t list: max_execution_time and max_input_time. Search the PHP Information tab for those. In my test, Output Buffering showed On, because XAMPP ships output_buffering=4096, while Joomla recommends Off.

    In PHP Information, look for three lines:

    • Server API tells you which edit method works.
    • Loaded Configuration File is the main php.ini.
    • Additional .ini files parsed lists extra ini files that can override it.
    Checking the loaded php.ini file and effective PHP values for Joomla

    Don’t trust php -i on the command line. CLI PHP can load a different php.ini from the web server. Check from the browser, or with a temporary file containing <?php echo php_ini_loaded_file(), ' ', php_sapi_name();, and delete it afterwards.

    Where do I change PHP settings for Joomla?

    Where to edit PHP settings for Joomla on cPanel, Plesk, php-fpm and XAMPP

    The right method depends on the Server API line. I tested both per-folder methods on the same mod_php server. The .user.ini file was ignored, and the .htaccess lines applied straight away:

    .user.ini ignored under Apache mod_php while .htaccess php_value applies

    That matches php.net, which says .user.ini files “are processed only by the CGI/FastCGI SAPI. If you are running PHP as Apache module, use .htaccess files for the same effect.”

    Apache mod_php (“Apache 2.0 Handler”): .htaccess

    # In Joomla's root .htaccess
    php_value memory_limit 256M
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 120
    php_value max_input_vars 5000
    php_flag  output_buffering Off

    Apache must allow overrides (AllowOverride Options or All). On any other Server API, php_value causes a 500 Internal Server Error, so remove the lines if the site goes down. Our Joomla .htaccess guide covers the rest of that file.

    CGI, FastCGI or PHP-FPM: .user.ini

    ; .user.ini in the Joomla root (and in /administrator if needed)
    memory_limit = 256M
    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 120
    max_input_vars = 5000
    output_buffering = Off

    PHP reads it from the script’s folder upwards to the document root. Changes can take up to user_ini.cache_ttl to apply (300 seconds by default). Only directives that can be set per directory work here.

    cPanel: MultiPHP INI Editor

    1. Go to cPanel → Software → MultiPHP INI Editor.
    2. In Basic Mode, select the domain, then set memory_limit, upload_max_filesize, post_max_size, max_execution_time, max_input_time and max_input_vars.
    3. Click Apply. cPanel writes the right file for your PHP handler. Check the PHP version in MultiPHP Manager too.

    Plesk: PHP Settings

    Go to Websites & Domains → your domain → PHP (PHP Settings). Choose the PHP version and handler, set the performance and common settings (memory_limit, max_execution_time, post_max_size, upload_max_filesize), and add max_input_vars = 5000 under additional directives. Then click OK or Apply.

    VPS with PHP-FPM (Nginx or Apache)

    ; /etc/php/8.3/fpm/pool.d/www.conf  (Debian/Ubuntu path; varies by distro)
    php_admin_value[memory_limit] = 256M
    php_admin_value[upload_max_filesize] = 64M
    php_admin_value[post_max_size] = 64M
    php_admin_value[max_execution_time] = 120
    php_admin_value[max_input_vars] = 5000
    
    sudo systemctl reload php8.3-fpm

    On Nginx, also raise client_max_body_size, which defaults to 1m. Otherwise uploads fail with 413 before PHP sees them. If PHP’s time limit is higher than the web server’s, increase fastcgi_read_timeout or proxy_read_timeout as well.

    XAMPP and local development

    Edit /opt/lampp/etc/php.ini on Linux, C:\xampp\php\php.ini on Windows (Apache → Config → PHP (php.ini) in the Control Panel), or /Applications/XAMPP/xamppfiles/etc/php.ini on macOS. Then restart Apache. XAMPP runs Apache with mod_php, so .htaccess also works and .user.ini doesn’t. If MySQL won’t start on XAMPP, see our XAMPP MySQL fix guide.

    How do I verify the change worked?

    1. Reload System → System Information → PHP Settings. Don’t rely on the panel showing your edit as saved.
    2. If the value didn’t change, check Server API and Loaded Configuration File in PHP Information.
    3. Test the real task: upload a 50 MB extension, or save the Global Configuration permissions.
    4. On PHP-FPM, reload the service. With .user.ini, wait up to 5 minutes.

    Why are my php.ini changes not applying?

    Symptom Cause Fix
    .user.ini has no effect Server API is Apache 2.0 Handler Use .htaccess php_value instead
    500 error after editing .htaccess php_value on FastCGI or FPM Remove the lines and use .user.ini or the host panel
    Edited php.ini but nothing changed Wrong file, or no restart Match “Loaded Configuration File”, then restart Apache or reload FPM
    Value reverts or is capped php_admin_value in the pool, or host limits Ask the host. A pool admin value can’t be overridden.
    Upload still fails at 64M post_max_size smaller, or Nginx client_max_body_size Make post ≥ upload and raise the Nginx limit
    Form saves but changes are lost max_input_vars at 1000 Set 3000–5000
    Admin settings only fail .user.ini only in the root Usually inherited, but some hosts need a copy in /administrator

    Which Joomla settings sit on top of PHP?

    • Global Configuration → Server → Error Reporting controls what Joomla shows. Keep it at “System Default” or “None” on live sites.
    • Global Configuration → System → Debug System is for development only.
    • Media → Options → Maximum Size (in MB) is Joomla’s own upload cap. It can’t exceed PHP’s limits.
    • Global Configuration → Server → Gzip Page Compression overlaps with server compression, so use one or the other.

    Locking PHP down also matters for security. See our Joomla security guide, which covers display_errors, disable_functions and open_basedir.

    Frequently asked questions

    Where is the php.ini file for Joomla?

    Joomla doesn’t have its own php.ini. Go to System → System Information → PHP Information and read “Loaded Configuration File”. On shared hosting, use your host’s panel or a .user.ini in the Joomla root instead.

    What PHP settings does Joomla 6.2 need?

    Joomla 6.2 is the latest version (13 October 2026). It needs PHP 8.3.0 or newer (8.4 recommended) and memory_limit of at least 256M. In practice, use upload_max_filesize and post_max_size of 64M, max_execution_time of 120, max_input_vars of 5000, and turn output_buffering and display_errors Off.

    What PHP version does Joomla 6 need?

    PHP 8.3.0 at minimum, with 8.4 recommended, according to the Joomla technical requirements. Joomla 5 needs 8.1.0 or newer, with 8.3 recommended.

    What memory_limit should I set for Joomla?

    At least 256M, which is the official recommendation for Joomla 5 and 6. Use 512M for large e-commerce sites, big imports or migrations.

    What max_input_vars does Joomla need?

    Use 3000–5000. The PHP default of 1000 silently drops fields on large forms such as permissions and menus. The old Joomla 3 help screens suggested 2500.

    Should output_buffering be on or off for Joomla?

    Off. Joomla’s installer and pre-update checks list output_buffering as a recommended “Off” setting. XAMPP and many php.ini-production files set it to 4096, which Joomla shows as “On”.

    Why does php_value in .htaccess give a 500 error?

    php_value only works when PHP runs as an Apache module. On FastCGI or PHP-FPM, Apache doesn’t recognise the directive and returns a 500 error. Use .user.ini instead.

    What is the difference between php.ini and .user.ini?

    php.ini is the main server file. .user.ini is a per-folder override that only CGI, FastCGI and PHP-FPM read, it’s cached for up to 5 minutes, and it only accepts per-directory directives.

    Why can’t I upload a 50 MB extension after raising upload_max_filesize?

    The smallest limit wins. post_max_size must be at least as large, and so must Nginx’s client_max_body_size and Joomla’s Media “Maximum Size”.

    Do I need to restart anything after editing php.ini?

    Yes. Restart Apache for mod_php, or reload PHP-FPM. .htaccess changes apply straight away, and .user.ini changes apply within user_ini.cache_ttl (300 seconds by default).

    Can I change PHP settings from inside Joomla?

    No. Joomla only shows them. Change them in the host panel or the server files, then check them in System Information.

  • Benefits of Joomla Migration

    Benefits of Joomla Migration

    The benefits of Joomla migration are concrete: you leave an unsupported major (especially Joomla 3 after August 2023), land on a release that still receives security fixes, run on PHP 8.x hosting hosts still sell, and unlock core features that used to need third-party extensions. In project language, a migration is a major structural hop (typically 3.10 to 4.4). A upgrade is the smoother path the project documents for 4.4 to 5 and 5.4 to 6. Both are what buyers mean when they search for Joomla migration benefits.

    Most articles on this topic stop at “security and speed,” or they stop at Joomla 5. Official docs explain why to migrate. Agency posts list three to ten reasons. Almost none combine official terminology, the full 3 through 6 hop map, Joomla 6 auto-updates, support end dates, when you should wait, the Behaviour – Backward Compatibility 6 rules, cleanup ROI, and a staging plan in one place. That is what this guide does, plus how Infyways runs the work from $149 with a free audit within 12 hours.

    What you will learn

    • Migration versus upgrade versus patch update (with the hop order that actually works)
    • Every major benefit: security, PHP and hosting, performance, admin UX, SEO, accessibility, multilingual, core features, Joomla 6 auto-updates
    • Official support windows so you know when urgency is real versus marketing panic
    • Why migration is also a cleanup project (the angle official docs emphasize)
    • What you lose by waiting on Joomla 3 or early 4, and when Joomla 5 owners can wait
    • How to start with Infyways without treating “click Update” as a plan

    Migration, upgrade, or patch: use the right word

    Confusion here is why thin competitor posts mislead people into a one-click 3 to 6 fantasy.

    Change Official framing Example What you should expect
    Patch Update 5.4.2 to 5.4.3 Same major. Use System → Update → Joomla. See update errors
    4.4 to 5.x Upgrade (not a full migration) 4.4.x to 5.4.x Many extensions work; Behaviour – Backward Compatibility helps. Plan on staging
    5.4 to 6.x Upgrade 5.4 to 6.0+ Disable Behaviour – Backward Compatibility (no number). Keep Behaviour – Backward Compatibility 6 enabled. See compat plugin guide
    3.10 to 4.4 Mini-migration / migration 3.10 to 4.4 Template and extension triage. Protostar does not survive
    3.x toward 5 or 6 Multi-hop migration 3.10 → 4.4 → 5.4 → 6 Never a single updater click. Path: 3 to 4, 5, and 6

    Primary sources: Why Migrate, 4.4 to 5 planning, 5 to 6 planning, and the Joomla 6.0 / 5.4 announcement.

    Support windows that decide urgency

    Scare posts skip dates. The Joomla roadmap and project announcements make urgency measurable:

    Line Bugfix / regular support Security-only support What that means for migration
    Joomla 3.10 Ended August 2023 Ended August 2023 Migrate now. There is no official patch line left
    Joomla 4.x Ended (security ended 14 October 2025) Ended Treat as EOL. Move to 5.4 then plan 6
    Joomla 5.4.x Through 13 October 2026 Through 12 October 2027 Safe to stay while extensions catch up for J6, if you are already on 5.4
    Joomla 6.x Through 17 October 2028 Through 16 October 2029 Active feature line. Finish here when staging is green

    So: Joomla 3 and 4 owners have a real security deadline. Joomla 5.4 owners have a planning window, not a midnight panic, unless the host or an abandoned extension forces the move sooner.

    Benefit 1: Security support that still exists

    Joomla 3.10 reached end of life in August 2023. The site does not magically shut off. Official security patches stop. That is the first benefit of migrating: you are on a maintained line again.

    • Core CVEs ship on current 5.x and 6.x.
    • Abandoned Joomla 3 extensions stop being a permanent attack surface once you replace or rebuild them.
    • Hosts and insurers increasingly treat EOL CMS stacks as unacceptable risk.

    Thin “3 reasons” posts mention security once. The operational point is this: every month on EOL core is a month where your risk grows and your vendor options shrink.

    Benefit 2: PHP and database versions you can still buy

    Hosts retire PHP 7 and old MySQL. Joomla 5 needs PHP 8.1 or newer. Joomla 6 needs PHP 8.3 or newer (8.4 recommended), with MySQL 8.0.13+ / MariaDB in the supported range or PostgreSQL 14+ class. Requirements: Joomla technical requirements.

    Target PHP Why migration unlocks hosting
    Joomla 5 8.1+ Matches mainstream shared hosting in 2026
    Joomla 6 8.3+ (8.4 recommended) Keeps the next renewal cycle viable

    Official docs also warn that hosts will not keep ancient stacks forever. Migration is often forced by the server long before the marketing team asks for new features.

    Benefit 3: Performance without the legacy JS tax

    Current Joomla uses modern PHP, a cleaned codebase, and the Web Asset Manager so templates load scripts only when needed. Core no longer ships MooTools. Default templates are built for current Core Web Vitals expectations.

    The caveat competitors skip: speed appears when the template and bloated extensions move with the core. Migrating the CMS and keeping a Joomla 3 club template untouched does not deliver the performance benefit. Related: remove MooTools from Joomla.

    Benefit 4: An administrator people will actually use

    From Joomla 4 onward the back end is a different product: clearer navigation, Guided Tours, a usable media manager (including AVIF on modern releases), and Dark Mode that editors notice. Magazine writers call out the adjustment period from Joomla 3, then the productivity gain. That matches what we see on client handovers.

    Modern Joomla media manager after migration with drag and drop uploads

    Benefit 5: Core features that replace paid extensions

    This is the benefit Why Migrate stresses and most agency blogs underwrite. Current Joomla can cover work that used to need a stack of third-party tools:

    • Custom fields for structured content
    • Workflows for editorial approval
    • Tags and Smart Search instead of legacy Search
    • Media manager improvements instead of a separate DAM for small sites
    • Cassiopeia child-style customization on recent releases without forking the whole template

    Migration is the moment to uninstall unused modules, kill “great ideas” that never launched, and reduce license sprawl. That lowers cost after go-live, not only risk.

    Benefit 6: SEO you can defend

    Joomla does not rank higher because the version number changed. You benefit because:

    • Modern routing and SEF stay maintainable
    • You can keep aliases and ship a 301 map when something must change
    • Schema and accessibility improvements support how Google evaluates pages
    • The site stays fast enough and online during crawl windows

    Rankings die on broken SEF, 500s after a botched live update, or months of downtime. Staging protects that. Troubleshooting: Joomla upgrade issues and Joomla SEO.

    Benefit 7: Accessibility, multilingual, and compliance

    • Accessibility: current admin and Cassiopeia-oriented front ends take WCAG-oriented patterns seriously. Public sector and education RFPs increasingly require that.
    • Multilingual: language handling and related tooling are stronger than on Joomla 3-era stacks, which matters for EU and multi-region sites.
    • Support window: majors follow a planned lifecycle (on the order of multi-year support per major). You get time to plan the next hop instead of living in permanent panic.

    Benefit 8: Joomla 6 features worth finishing the path for

    Posts that stop at “move to Joomla 5” are already dated. From 5.4 into 6 you also gain reasons to complete the journey:

    • Automatic core updates with the secure update framework introduced across 5.4 and 6.0
    • Behaviour – Backward Compatibility 6 so more extensions survive the hop while vendors catch up
    • Extended versioning that reaches further into custom fields and related content structures
    • Language file caching and media manager improvements
    • Editor updates (TinyMCE on the current 6.x line) for day-to-day publishing
    • Child templates and richer content tools that reduce forking Cassiopeia for small design changes

    Before the hop: prove every third-party extension runs on Joomla 5.4 with the older Behaviour – Backward Compatibility plugin disabled. Then upgrade with Behaviour – Backward Compatibility 6 enabled. After vendors ship native J6 builds, disable BC6 to drop the compatibility overhead. Full rules: 5 to 6 planning.

    Product overview: Joomla 6. Community write-up: What is new in Joomla 6.0.

    Benefit 9: The cost of not migrating

    If you stay on What usually happens next
    Joomla 3 No official security line, vendors gone, PHP upgrades break the site
    Early Joomla 4 on PHP 8.0 hosts Host forces PHP up; site fatals; emergency weekend work
    Joomla 5 without a 6 plan You miss auto-update and lifecycle planning; the next hop becomes a fire drill
    Heavy abandoned extensions Every delay makes rebuild cost higher, not lower

    Waiting rarely saves money. It concentrates risk into a single emergency project.

    Who benefits most (urgency map)

    Situation Main benefit Urgency
    Still on Joomla 3 Security + PHP + vendors High
    Joomla 4, host retiring PHP Stay online High
    VirtueMart / custom components Commerce on supported builds High if vendors dropped your major
    Government / education Supported CMS for audits High
    Joomla 5.4, PHP 8.3+, extensions J6-ready Joomla 6 features + lifecycle Upgrade on staging now
    Joomla 5.4, critical extensions not J6-ready Stay secure on 5.4 while vendors catch up Medium: schedule, do not freeze forever
    Agencies with many client sites One standard stack, fewer snowflake servers High for white-label ops

    What thinner articles leave out

    Topic Typical competitor post This guide
    Versions covered Joomla 3 to 5, or 5 to 6 only 3 through 6 with hop order
    Migration vs upgrade Mixed or wrong Official project language in a table
    Support end dates Vague “EOL soon” Roadmap dates for 3, 4, 5.4, and 6
    Joomla 6 auto-updates Often missing Called out as a finish-line benefit
    BC6 plugin rules Skipped or one line Disable old BC, keep BC6, retire later
    When waiting is OK Rarely said J5.4 security window through October 2027
    Cleanup / core replacements Mentioned lightly Tied to Why Migrate and cost reduction
    Staging + SEO cutover Generic “take a backup” Steps, Pre-Update Check, 301 map, Search Console
    Commercial next step Vague contact form Audit in 12 hours, packages from $149

    Step 1: Inventory version, PHP, and extensions

    1. System → System Information: Joomla, PHP, database.
    2. Export or screenshot Manage → Extensions.
    3. Mark each extension: has a current build, needs rebuild, or can be replaced by core.
    4. Pick only the next hop from the table above.

    Step 2: Back up with a restore test

    A migration benefit is worthless without rollback. Take files + database, store a copy off-server, and confirm restore once. Method: how to backup a Joomla website.

    Step 3: Prove it on staging

    Joomla Pre-Update Check used when planning a migration on staging
    1. Clone production to staging.
    2. Run Pre-Update Check. Fix or replace blockers.
    3. Complete the hop. Run Database Fix. Clear caches.
    4. Click through login, forms, multilingual switchers, and checkout if you have a store.
    5. Only then book the production window.

    When something breaks, use the issue map: common Joomla upgrade issues.

    Step 4: Cut over with SEO and support intact

    • 301 map ready for any alias that must change
    • Search Console checked in week one
    • CDN and page cache purged
    • 30 days of watch for extension edge cases

    How Infyways delivers those benefits

    We are not a generic “we love Joomla 5” essay. We migrate production sites:

    • Free compatibility audit within 12 hours (credentials optional for the first pass)
    • Fixed packages from $149 small / $299 medium / custom enterprise and stores
    • 125 Joomla extensions built in-house, so rebuilds are normal work, not a surprise
    • Staging-first cutover and 30 days of post-launch support on migration defects

    Start: Joomla Upgrade Services.

    Key takeaways

    1. Migration benefits are security, hosting, performance, admin UX, fewer extensions, SEO resilience, accessibility, and Joomla 6 lifecycle features.
    2. Use official words: 3 to 4 is a migration; 4.4 to 5 and 5.4 to 6 are upgrades.
    3. Hop order is 3.10 → 4.4 → 5.4 → 6. No shortcuts.
    4. Urgency follows support windows: EOL on 3/4 is immediate; 5.4 still has a security lane into late 2027.
    5. Cleanup is part of the ROI: drop unused extensions and replace them with core where you can.
    6. Speed and SEO appear only when template and extensions move with the CMS.
    7. Waiting on EOL core increases cost. Fixed-price staging work is cheaper than an emergency rebuild.

    Frequently asked questions

    What are the benefits of Joomla migration?

    You regain security updates, PHP 8 hosting, a modern administrator, vendor-supported extensions, better performance potential, stronger accessibility and multilingual options, and a path into Joomla 5 and 6 features such as automatic core updates.

    Is Joomla 4 to 5 a migration or an upgrade?

    The Joomla project treats 4.4.x to 5.x as an upgrade, not a full migration. Extension checks and staging are still required.

    Is Joomla 5 to 6 a migration?

    No. From 5.4.x it is an upgrade, with Behaviour – Backward Compatibility 6 involved. From Joomla 3 it is still a multi-hop migration.

    Do I need to upgrade from Joomla 5 to Joomla 6 immediately?

    No. Joomla 5.4 remains on a security path through 12 October 2027. Upgrade when templates and extensions are J6-ready and staging is green, not because a headline says “now or never.”

    What is the Behaviour – Backward Compatibility 6 rule before upgrading?

    On Joomla 5.4, disable the older Behaviour – Backward Compatibility plugin (no number in the name) only after extensions run without it. Keep Behaviour – Backward Compatibility 6 enabled for the move into Joomla 6. Disable BC6 later when every extension is native.

    Does my Joomla 3 site stop working after end of life?

    No. It keeps running without official security fixes while hosts and vendors move on.

    Will migration improve Google rankings by itself?

    No. It protects the technical baseline (uptime, SEF, modern HTML performance). Content and links still decide rankings.

    Can core Joomla replace some of my extensions after migration?

    Often yes. Custom fields, workflows, tags, and Smart Search cover many older third-party use cases. That is a deliberate benefit of migrating now.

    How much does Joomla migration cost with Infyways?

    Packages start at $149 for small sites and $299 for medium sites. Enterprise and stores are custom after the free audit.

    How long does it take?

    Small brochure sites can finish in days after staging is ready. Stores and custom components take longer. The audit sets the timeline.

    Where do we start?

    Request a Joomla upgrade audit or contact Infyways.

  • How to Change the Template in Joomla 5 & 6: Step-by-Step Guide

    How to Change the Template in Joomla 5 & 6: Step-by-Step Guide

    To change the template in Joomla 5 or 6, go to System → Site Template Styles, click the star in the Default column next to the style you want, and check the front end. The same steps work in Joomla 4.

    Step 1: Back up first

    A new template can move modules and hide content. Take a full backup with Akeeba Backup (see how to back up Joomla) or test on a staging copy.

    Step 2: Install the new template

    Go to System → Install → Extensions and upload the template ZIP from the vendor. Make sure the vendor lists Joomla 5 or 6 compatibility; templates made for Joomla 3 will not work and may break the site.

    Step 3: Make it the default

    1. Go to System → Templates → Site Template Styles.
    2. Find the new style and click the grey star in the Default column. It turns gold.
    3. To keep the old template for some pages instead, open the new style, go to the Menu Assignment tab and tick only those menu items.

    Step 4: Map module positions

    Each template has its own position names. Go to Content → Site Modules, filter by template, and move modules that disappeared to the new positions. Append ?tp=1 to a page URL to preview positions (enable “Preview Module Positions” in System → Templates → Options first; switch it off again afterwards).

    Step 5: Check overrides and child templates

    Layout overrides live inside the old template folder, so they do not carry over. Recreate the ones you need in the new template, ideally in a Joomla child template so vendor updates do not overwrite them. If changes do not appear, see Joomla CSS changes not showing and template override not working.

    Changing the administrator template

    System → Administrator Template Styles works the same way. Joomla 4, 5 and 6 ship Atum; change it only if an extension needs it.

    Want a custom design instead of a stock template? See Joomla design services or start from the free Joomla template generator.

    Frequently asked questions

    Where are templates in Joomla 5?

    System → Templates → Site Template Styles for the front end, and Site Templates to edit the files.

    Can I use different templates on different pages?

    Yes. Open a template style, go to Menu Assignment and choose the menu items that should use it.

    Why did my modules disappear after changing template?

    The new template uses different position names. Move the modules to the new positions in Content → Site Modules.

  • Disable Joomla extension update notification?

    Disable Joomla extension update notification?

    To maintain the Joomla security and functionality of websites, it’s crucial to regularly update both the site and the third-party extensions used. Regular updates address a variety of issues, including enhancing functionality features, upgrading PHP functions, and ensuring compatibility with the latest Joomla versions.

    However, some website owners hesitate to update extensions. This could be due to modifications they’ve made to the extension’s core files, which they fear might be overwritten, or they may be reluctant to purchase the commercial extension after the license expires. As a result, they frequently encounter a red notification upon logging into the Joomla backend.

    To disable the update notification for specific extensions in the backend for Joomla 4.x.x, follow these simple steps:

    Step 1: Log in to the backend of your Joomla website using the Super admin login details.

    Step 2: Navigate to the System Menu > Update > Update Sites.

    Update sites

    Step 3: On the Update Sites page, you’ll find a list of Update Sites with an XML link below each. Select the extension for which you want to disable the update notification.

    Update sites manager

    Step 4: Select the extension(s) and click on the disable button. To clear the Joomla cache, go to the System menu > Clear Cache.

    By following these steps, you can manage your Joomla upgrade issues more effectively, ensuring a smoother and more secure user experience.

  • How to Upgrade Joomla Using cPanel: A Comprehensive Guide

    How to Upgrade Joomla Using cPanel: A Comprehensive Guide

    This detailed tutorial will help you handle the upgrade process quickly, whether you’re considering upgrading Joomla 3 to 4, or perhaps looking to improve your older Joomla 1.5 to the latest version.

    For those wondering how to upgrade Joomla manually, or wishing to update to the latest Joomla version, this article will provide the necessary steps to make the process as smooth as possible.

    Upgrading your Joomla version regularly is essential to maintaining a secure, efficient, and feature-rich website. Let’s delve into the step-by-step process of upgrading Joomla using cPanel.

    Backup Your Website

    Before any major changes to your Joomla website, it’s always prudent to create a backup. This way, should anything go wrong during the upgrade, you can revert to the previous state. You can do this within cPanel using the Backup Wizard or by using Joomla extensions like Akeeba Backup.

    Check Extension Compatibility

    Before upgrading, make sure your extensions are compatible with the new Joomla version. You can find this information on the Joomla extensions directory or the extension developer’s website. It’s crucial to ensure smooth operation after the upgrade.

    Upgrade Your Joomla Version

    Once the backup is complete and the extensions are compatible, you can proceed with the upgrade. If you’re using Joomla 3, you can easily upgrade to Joomla 4 from your Joomla control panel.

    If you’re using an older version such as Joomla 1.5, the upgrade process might be a bit more complex. You would need to migrate your site to Joomla 2.5 before proceeding with the upgrade to Joomla 3 or 4. Here, you can follow a detailed guide on how to upgrade Joomla 1.7 to 2.5 and subsequently upgrade from Joomla 3 to Joomla 4.

    Test Your Website

    Once you’ve completed the upgrade, make sure to thoroughly test your website to ensure everything is functioning correctly. If you run into issues, you might need to refer to this guide on fixing Joomla issues.

    Update Your Extensions and Templates

    After ensuring your website works well with the new Joomla version, it’s time to update your extensions and templates. Doing this after the Joomla upgrade reduces the chances of encountering compatibility issues.

    Now that you know how to upgrade Joomla using cPanel, it’s important to regularly check for new Joomla updates to keep your website secure and running efficiently. Joomla’s latest version, Joomla 4, has introduced several new features to enhance your website’s performance and improve the user experience.

    Frequently Asked Questions​

    How often should I upgrade my Joomla version?

    Joomla regularly releases updates to enhance security and functionality. Therefore, it’s recommended to check for updates every few months.

    How do I check if my extensions are compatible with the new Joomla version?

    You can check the compatibility of your extensions by visiting the Joomla Extensions Directory or the extension developer’s website.

    What do I do if my website breaks after the Joomla upgrade?

    If your website breaks after the upgrade, you can restore your website from the backup you created before the upgrade process.

    How do I upgrade from Joomla 1.5 to Joomla 4?

    Upgrading from Joomla 1.5 to Joomla 4 involves migrating to Joomla 2.5, then upgrading to Joomla 3, and finally to Joomla 4.

    Embrace the world of enhanced features, improved user experience, and robust security with the latest Joomla version. Happy Upgrading!

  • How to Add a Module Inside an Article in Joomla 5 & 6 (loadposition and loadmodule)

    How to Add a Module Inside an Article in Joomla 5 & 6 (loadposition and loadmodule)

    To show a module inside a Joomla article, publish the module to a custom position and type {loadposition your-position} in the article, or load one specific module with {loadmodule mod_name,Module Title}. Both shortcodes come from the core Content – Load Modules plugin in Joomla 4, 5 and 6.

    Option 1: {loadposition} (load every module in a position)

    1. Go to Content → Site Modules and click New. Choose a type, for example Custom, Articles – Latest or Menu.
    2. In the Position field type a new name that your template does not use, for example article-promo, and press Enter to create it.
    3. Under Menu Assignment choose “On all pages” (or the pages where the article appears). A module assigned to no pages will not load, even inside an article.
    4. Save and close the module.
    5. Open the article and, where the module should appear, type {loadposition article-promo} on its own line. Save.

    Every published module in that position is rendered, in module ordering. Add a style to change the chrome: {loadposition article-promo,card} uses the Cassiopeia “card” style; none outputs the module without a wrapper.

    Option 2: {loadmodule} (load one module by type and title)

    Use this when you do not want to create a new position:

    {loadmodule mod_custom,Spring offer}
    {loadmodule mod_articles_latest}

    The first value is the module type (as listed in the Modules list, for example mod_custom), the second is the exact module title. Without a title, Joomla loads the first published module of that type. Joomla 4 and later also accept {loadmoduleid 97} to load a module by its ID, which is the safest choice if titles change.

    Make sure the plugin is enabled

    Go to System → Manage → Plugins, search for Content – Load Modules and check it is enabled. In its options you can set the default module style. If the shortcode appears as plain text on the page, this plugin is disabled or the text editor has wrapped the code in a link or span.

    Why the module is not showing

    SymptomFix
    Shortcode shows as textEnable Content – Load Modules; retype the shortcode in the editor’s code view
    Nothing appearsModule unpublished, assigned to no pages, or access level higher than the visitor’s
    Shows in the article but also in a sidebarThe position name is used by the template; pick a unique name
    Works in the article view but not in a blog/featured layoutCheck “Show Intro Text” and that the shortcode is in the intro, or use the full article view

    More fixes in Joomla module not showing and module position not showing. Need a module built for your site? See Joomla module development or try the free Joomla module generator.

    Frequently asked questions

    What is the difference between loadposition and loadmodule?

    loadposition renders every published module assigned to a position. loadmodule renders one module chosen by its type and title, and loadmoduleid renders one module by its ID.

    Why does {loadposition} show as plain text?

    The Content – Load Modules plugin is disabled, or the editor has inserted HTML inside the braces. Enable the plugin and retype the shortcode in code view.

    Does loadposition work in Joomla 6?

    Yes. The Content – Load Modules plugin is part of Joomla 4, 5 and 6 core.

  • Procedure to Upload an Excel Sheet on Joomla Website

    Procedure to Upload an Excel Sheet on Joomla Website

    Uploading an Excel sheet to a Joomla website involves several steps. Here’s a step-by-step procedure to help you achieve this:

    1. Login to Joomla Administrator Panel:
      • Navigate to your Joomla website’s admin URL (typically yourwebsite.com/administrator).
      • Enter your username and password to log in.
    2. Media Manager:
      • From the top menu, select Content and then click on Media.
      • This will take you to the Media Manager, where you can manage and upload files.
    3. Upload the Excel File:
      • Click on the Upload button (usually represented by an upward arrow icon).
      • Browse your computer to select the Excel file you wish to upload.
      • Once selected, click on the Start Upload button. Your Excel file will be uploaded to the Joomla server.
    4. Linking the Excel File:
      • Once the file is uploaded, you can link to it from articles or modules.
      • Edit or create a new article where you want to place the link.
      • Highlight the text you want to use as a link.
      • Click on the Insert/Edit Link button in the editor toolbar.
      • In the URL field, browse or type the path to the uploaded Excel file. It will typically be in the format: /images/yourfilename.xlsx.
      • Set the target to “_blank” if you want the file to open in a new window/tab.
      • Click on Insert to add the link.
    5. Extensions for Advanced Functionality:
      • If you want to display the Excel content directly on your Joomla site or provide advanced download features, you might consider using Joomla extensions. Extensions like “Edocman” or “Dropfiles” can help manage and display documents, including Excel sheets, more effectively.
    6. Ensure File Security:
      • Make sure that any sensitive information is removed from the Excel sheet before uploading.
      • Regularly backup your Joomla site, including the Media Manager files.
      • Consider using security extensions to protect your uploaded files from unauthorized access.
    7. Test the Upload:
      • After uploading and linking the Excel file, visit the front end of your Joomla site.
      • Click on the link you created to ensure the Excel file downloads or displays correctly.

    Remember, the exact names of buttons and the layout might vary depending on the Joomla version you’re using and any customizations or extensions you have installed. Always ensure that you’re following best practices for website security when uploading and linking to files.

  • Disable deprecated Joomla messages

    Disable deprecated Joomla messages

    Disabling deprecated Joomla messages means stopping PHP E_DEPRECATED notices (and often Joomla “Log Deprecated API” noise) from flooding the front end, administrator, or log files. On Joomla 4, 5, and 6 the safe first move is Global Configuration → Server → Error Reporting set to None on production (or Simple while you triage), with Debug System off. Hiding messages is not a substitute for updating the extension or template that still calls old APIs.

    Thin guides still tell you to paste error_reporting(…) at the bottom of configuration.php. That file is a PHP class of settings, not a free-form bootstrap script, and Joomla already maps Error Reporting into $error_reporting. This guide shows the admin path, the correct DIY edits when the admin is locked, PHP host filters, what Maximum does on PHP 8, and when you should fix the real code instead of silencing it.

    What you will learn

    • What deprecated messages are (PHP vs Joomla API logging)
    • Production vs staging Error Reporting choices
    • How to turn off Log Deprecated API and Debug System
    • DIY: edit $error_reporting in configuration.php when the admin is down
    • DIY: php.ini / .htaccess filters when System Default inherits a noisy host
    • Why Maximum + PHP 8 can make a site unusable, and how to recover
    • When silencing is wrong and you need an upgrade instead

    Two different “deprecated” problems

    Source What you see Control
    PHP E_DEPRECATED Yellow/red notices on the page, or entries in the server error log Error Reporting + PHP error_reporting / display_errors
    Joomla deprecated API log Growing deprecated.php under the log path Global Configuration → Logging → Log Deprecated API
    Debug System overlays Extra debug chrome and stack traces for developers Global Configuration → System → Debug System

    Primary references: Global Configuration guide, Joomla logging, and the long PHP 8 discussion around Error Reporting set to Maximum (joomla-cms#36171).

    Error Reporting levels (what each one does)

    Setting Typical effect Use when
    System Default Uses the host php.ini / FPM value You control PHP and want one source of truth
    None No PHP errors displayed to visitors Production. Default recommendation
    Simple Basic errors (roughly errors, warnings, parse). Filters many notices and deprecations Quick triage without drowning in E_DEPRECATED
    Maximum Forces a very high reporting level (effectively all errors) Staging only. Can flood PHP 8+ sites with deprecations
    Development Full developer reporting Local clone only

    Security note: production should not display PHP errors to the public. Prefer None for visitors, and read server logs or a staging clone when you need detail.

    Step 1: Set Error Reporting in Global Configuration

    1. Log in to Administrator.
    2. System → Global Configuration → Server tab.
    3. Error Reporting: choose None for live sites, or Simple if you still need basic faults visible to admins on staging.
    4. Save & Close.
    5. Reload the front end and administrator. Deprecated banners from PHP display should be gone when None is active.

    Step 2: Turn Debug System off on production

    1. System → Global Configuration → System tab.
    2. Debug System: No.
    3. Debug Language: No unless you are translating.
    4. Save.

    Debug Mode plus Maximum is how sites become unreadable under PHP 8 when old extensions still emit deprecations.

    Step 3: Stop Log Deprecated API filling administrator/logs

    1. System → Global Configuration → Logging tab.
    2. Log Deprecated API: No on production (Yes only while you are intentionally auditing extensions).
    3. Log Almost Everything: No unless you are debugging a specific incident.
    4. Note the Path to Log Folder. If deprecated.php is huge, archive or delete it after you turn logging off (keep a copy if you still need the list of offenders).
    5. Save.

    Log Almost Everything does not include the deprecated category. Deprecated API calls use the separate Log Deprecated API switch and write to deprecated.php.

    Step 4: DIY when the administrator is locked

    If deprecated output or a fatals storm blocks the admin UI, edit configuration.php over SFTP or hosting File Manager. Change permissions temporarily if the file is read-only (often 444 → 644 on Linux hosts), edit, then lock it down again.

    Set the property Joomla already understands. Do not append a free-standing error_reporting(…) call at the bottom of the class file:

    public $error_reporting = 'none';
    public $debug = false;
    

    Useful values for $error_reporting: 'none', 'simple', 'maximum', 'development', or 'default' (system default). Matching debug:

    public $debug = false;
    

    Optional logging flags you may also see in the same file:

    public $log_everything = 0;
    public $log_deprecated = 0;
    

    Save the file, reload the site, then finish the job in Global Configuration once the admin is reachable again.

    Step 5: DIY PHP host filter (System Default or compile-time noise)

    Some deprecations fire so early that only the PHP process setting fully hides them. Prefer the host panel (MultiPHP INI, PHP-FPM pool, or “Select PHP version → Options”).

    Example php.ini / FPM style:

    display_errors = Off
    error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
    log_errors = On
    

    On Apache with AllowOverride permitting PHP flags, some hosts accept:

    php_value error_reporting 22527
    

    (22527 is a common integer for E_ALL & ~E_DEPRECATED on older PHP lines. Confirm with echo E_ALL ^ E_DEPRECATED; on your PHP version, or use the host UI instead of guessing.)

    If Global Configuration is set to Maximum, Joomla overrides the host filter for display. Switch Maximum off first, then tune PHP.

    Step 6: Verify and keep staging honest

    1. Production: Error Reporting None, Debug No, Log Deprecated API No.
    2. Staging clone: temporarily use Simple or Development, or enable Log Deprecated API, and capture which extensions appear in the log.
    3. Confirm visitors no longer see notice HTML in View Source.
    4. Confirm the server error log is not still spamming the same deprecations every request (display off does not always stop logging).
    5. Clear Joomla cache after config changes.

    What not to do

    • Do not paste error_reporting(E_ALL & ~E_DEPRECATED); at the bottom of configuration.php. That old Infyways tip (and many Stack Overflow clones) treats a settings class like index.php.
    • Do not leave Maximum + Debug on a public PHP 8 site “just in case.”
    • Do not error_reporting(0) in core index.php as your long-term strategy. Updates overwrite it and you lose real fatals you need.
    • Do not ignore a flood of deprecations forever on an abandoned extension. PHP 8.3 / 8.4 and Joomla 6 will keep raising the cost.

    Fix the cause when messages point at your stack

    Signal Likely cause Next step
    Deprecations name a third-party extension path Extension not ready for your PHP / Joomla line Update or replace the extension
    Deprecations name a template override Old PHP in the override Rewrite the override on a child template
    Only on Maximum / Development Expected noise while modernising Keep production on None; fix on staging
    Site unusable after a PHP upgrade Reporting too high + legacy code Set None/Simple via configuration.php, then plan an upgrade

    If the site is still on Joomla 3 or early 4 with abandoned extensions, silencing notices only buys time. Infyways upgrades start at $149 with a free audit within 12 hours: Joomla Upgrade Services.

    What thinner articles leave out

    Topic Typical post This guide
    First step Hack configuration.php with error_reporting() Global Configuration Error Reporting
    Joomla API log Ignored Log Deprecated API and deprecated.php
    PHP 8 + Maximum Missing Why the site can go blank or unusable
    Locked admin Vague FTP advice Edit $error_reporting and $debug properties correctly
    Host PHP One .htaccess line display_errors, logging, and Maximum override behaviour
    Root cause “Messages are annoying” Update extensions or upgrade the CMS

    Key takeaways

    1. Production: Error Reporting None, Debug System No, Log Deprecated API No.
    2. Simple is a useful middle ground for triage without full deprecation spam.
    3. Avoid Maximum on live PHP 8+ sites unless you are ready for noise.
    4. When locked out, set $error_reporting = 'none'; and $debug = false; in configuration.php.
    5. Do not append raw error_reporting() calls to configuration.php.
    6. Host PHP filters help when System Default inherits a noisy ini, but Maximum overrides them for display.
    7. Silencing is temporary. Fix or replace the extension that still uses deprecated APIs.

    Frequently asked questions

    How do I disable deprecated Joomla messages?

    Set Global Configuration → Server → Error Reporting to None on production, turn Debug System off, and set Log Deprecated API to No.

    What is the difference between Error Reporting None and Simple?

    None hides PHP error display. Simple still shows basic errors and warnings but filters much of the notice and deprecation noise.

    Why did Maximum make my PHP 8 site unusable?

    Maximum forces very high reporting, so every E_DEPRECATED from legacy extensions can dump onto every page. Switch back to None or Simple.

    How do I edit Error Reporting if the administrator will not load?

    Edit configuration.php and set public $error_reporting = ‘none’; and public $debug = false; then reload.

    Should I add error_reporting() to configuration.php?

    No. Use the $error_reporting property or the Global Configuration UI. Appending a free-standing call is an outdated and brittle hack.

    What does Log Deprecated API do?

    It writes Joomla deprecated API usage to deprecated.php in the log folder. Turn it on only while auditing, then turn it off.

    Will hiding deprecated messages fix security issues?

    No. It only stops display or API logging. Outdated extensions can still be vulnerable. Plan updates or a migration.

    Can I filter E_DEPRECATED in php.ini only?

    Yes for System Default, and for some compile-time cases. If Joomla Error Reporting is Maximum, change that setting too.

    Where do we start if deprecations come from abandoned extensions?

    Request a Joomla upgrade audit so the stack moves to current Joomla and PHP with supported replacements.

  • How to Add Custom JavaScript to Joomla 5 and 6.2 (5 Tested Methods)

    How to Add Custom JavaScript to Joomla 5 and 6.2 (5 Tested Methods)

    Updated 15 October 2026 · By Abhilash Sahoo, Founder, Infyways

    Quick answer: The fastest way to add custom JavaScript to Joomla 5 or 6 with Cassiopeia is to create media/templates/site/cassiopeia/js/user.js. Joomla loads it on every page with no code changes. For anything more, use the Web Asset Manager:

    1. For a file: $wa->registerAndUseScript('my.site', 'media/templates/site/cassiopeia/js/site.js', [], ['defer' => true]);
    2. For a snippet: $wa->addInlineScript('…');
    3. To keep it to one page, put the code in a template override.

    Avoid pasting raw <script> tags into the template or a Custom HTML module. Editors strip them, and a Content Security Policy blocks them. This all applies unchanged to Joomla 6.2, the latest version.

    I tested every method below on a real Joomla 5.4.10 site (PHP 8.2, XAMPP) and checked the browser console in Chrome. I also compared the relevant Joomla 6.2.0 source files. Images marked “real output” show what the site actually printed. References: Joomla’s Adding JavaScript and Web Asset Manager documentation.

    Which way should I add JavaScript to Joomla?

    Comparison of five ways to add custom JavaScript to Joomla
    Method Best for Needs code? defer / async Works with a CSP nonce? Pages
    Cassiopeia user.js Small site-wide tweaks No No Yes (tested) All
    Web Asset Manager in a child template Files, CDNs, load order PHP Yes Yes (tested) All, or with conditions
    Template override plus useScript() One view (article, contact form) PHP Yes Yes That view
    Custom HTML module Widgets pasted by non-developers HTML Manual No: blocked (tested) Menu assignment
    Plugin such as Easy Includes Site-wide files, CDN URLs or snippets without template edits No Yes (Normal, Defer, Async) Yes (tested) All front-end pages, minus exclusions

    Don’t edit Cassiopeia’s own index.php. Joomla updates overwrite it. My tests changed it only to show the output; for a real site, use a child template.

    How do I add JavaScript with user.js in Cassiopeia?

    1. Go to System → Site Templates → Cassiopeia Details and Files.
    2. Open media/templates/site/cassiopeia/js (shown as the js folder). Click New File, name it user, choose type .js, and click Create.
    3. Add your code and save:
    document.addEventListener('DOMContentLoaded', () => {
      // your code
    });

    Nothing else is needed. Cassiopeia’s joomla.asset.json already declares a template.user script, and index.php already calls useScript('template.user'). The tag only appears once the file exists:

    Page source before and after creating user.js in the Joomla Cassiopeia template
    Cassiopeia joomla.asset.json entry for template.user script

    Two things I found in testing:

    • No defer. user.js loads as a normal script, so wrap DOM code in DOMContentLoaded.
    • Caching. The ?970ad6 on the URL is the site’s media version, not a hash of your file. After editing user.js, visitors may still get the cached copy. Hard-reload while testing. For a change visitors must get immediately, rename the file, or load it with the Web Asset Manager and your own version number. See caching in Joomla.

    How do I add a script with the Web Asset Manager?

    The Web Asset Manager (WAM) is the official API in Joomla 4, 5 and 6. In a template file, $wa = $this->getWebAssetManager();. Elsewhere, use Factory::getApplication()->getDocument()->getWebAssetManager().

    // local file, deferred, loads after Joomla core.js
    $wa->registerAndUseScript('custom.site', 'media/templates/site/cassiopeia/js/site.js',
        ['version' => 'auto'], ['defer' => true], ['core']);
    
    // CDN file, async, no ?version query
    $wa->registerAndUseScript('custom.dayjs', 'https://cdn.jsdelivr.net/npm/dayjs@1.11.13/dayjs.min.js',
        ['version' => false], ['async' => true, 'crossorigin' => 'anonymous']);

    The arguments are name, URI, options, HTML attributes and dependencies. Here’s what Joomla actually printed:

    Script tags produced by Joomla Web Asset Manager registerAndUseScript with defer and async

    When I passed an empty options array, Joomla added the media version (?970ad6) to the CDN URL as well. Pass ['version' => false] to keep third-party URLs clean. This matters for some CDNs and for SRI hashes.

    Should I use joomla.asset.json instead?

    If you have several scripts, yes. Declare them once in your template’s or extension’s joomla.asset.json, then call $wa->useScript('name'):

    {
      "$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
      "name": "mytemplate",
      "version": "1.0.0",
      "assets": [
        { "name": "mytemplate.site", "type": "script", "uri": "site.js",
          "attributes": { "defer": true }, "dependencies": ["core"], "version": "auto" }
      ]
    }

    Templates and components pick up their file automatically. For a module or plugin, call $wa->getRegistry()->addExtensionRegistryFile('mod_example'); first (official docs).

    How do I add inline JavaScript or pass PHP values to JS?

    $wa->addInlineScript("document.documentElement.dataset.ready = '1';");
    
    // PHP → JS without building strings
    $this->addScriptOptions('custom.cfg', ['siteName' => $sitename]);
    // in JS: Joomla.getOptions('custom.cfg').siteName

    In my test, Joomla.getOptions('custom.cfg') returned {"siteName":"Demo"}. Your script needs core as a dependency to use Joomla.getOptions.

    How do I add JavaScript to one page only?

    Create a template override for that view, for example System → Site Templates → Cassiopeia Details and Files → Create Overrides → Components → com_content → article. Then add near the top of templates/cassiopeia/html/com_content/article/default.php:

    $wa = \Joomla\CMS\Factory::getApplication()->getDocument()->getWebAssetManager();
    $wa->registerAndUseScript('custom.article', 'media/templates/site/cassiopeia/js/article.js', [], ['defer' => true]);

    Overrides live in the html folder, and Joomla updates leave them alone. To target one menu item rather than one view, wrap the call in a check on $app->getMenu()->getActive()->id.

    How do I add JavaScript without editing the template?

    Use a system plugin that registers your scripts through the Web Asset Manager for you. One example is Easy Includes 2.0 from JoomlaX (our own extension), which supports Joomla 4, 5 and 6. Its documentation lists what it does:

    • Files tab: add a site-relative path or a full https:// CDN URL for each CSS or JS file. For each script you choose Normal, Defer or Async loading, plus optional type="module", nomodule, crossorigin and an SRI hash.
    • Inline Code tab: paste short, trusted CSS or JS snippets. Inline JavaScript isn’t HTML-filtered, so only trusted admins should manage the plugin.
    • Load Priority: rows with higher numbers register first.
    • Exclusions: skip selected user groups, components (for example com_users) or URL path fragments (for example /checkout). If any exclusion matches, nothing loads on that page. There is no include-only-on-this-menu-item option, so for single-page scripts use an override.
    • Cache busting: Off, Auto (uses the file’s modification time) or Aggressive (for testing only).
    • Front end only by default. The admin area loads the assets only if you turn on Enable in Administrator.

    Script loading is set per file, and there is no head-or-body choice. Version 2.0 replaced that option with Normal/Defer/Async. I installed the 2.0 package on the same test site, with the CSP nonce turned on:

    • A deferred file printed as <script src="/j5/images/ei-test.js?1792064452" defer nonce="…">. With Auto cache busting, the number is the file’s modification time.
    • The inline snippet also got the nonce, and Chrome ran both.
    • On the login page (com_users, excluded), neither loaded.

    Updates install from the Joomla admin with a valid JoomlaX licence.

    Can I put a script in a Custom HTML module?

    Yes, and the script runs on a site without a CSP. In my test, the module’s <script> ran normally. There are two catches:

    • Editors strip it. TinyMCE lists script under Prohibited Elements by default. Switch your user’s editor to Editor – None or CodeMirror while pasting. Make sure your group’s Text Filter (Global Configuration → Text Filters) isn’t removing it. Super Users have no filtering by default (Joomla HTML filters guide).
    • A CSP blocks it. The script has no nonce, as the next test shows.

    Will my script work with a Content Security Policy nonce?

    Only if it goes through Joomla’s API. I enabled System – HTTP Headers → Content Security Policy with Nonce on and script-src 'self' https://cdn.jsdelivr.net. Joomla prepended a fresh nonce to the header and added nonce="…" to every Web Asset Manager tag, including user.js and the addInlineScript() block. Chrome then ran those and blocked the module’s raw script:

    Joomla CSP nonce test: Web Asset Manager scripts run, raw script tag blocked

    Since Joomla 4.2 you no longer need to type {nonce} in the directive. The plugin removes the old placeholder and adds the nonce itself (from the 5.4 and 6.2 source). Every external host your scripts load from must be listed in script-src. More on headers in our Joomla .htaccess guide and the official HTTP Headers guide.

    Should I use defer, async or type=”module”?

    Attribute Runs Order kept? Use for
    none Immediately, blocks HTML parsing Yes Rarely; tiny scripts that must run first
    defer After HTML is parsed Yes Most site scripts that touch the DOM
    async As soon as downloaded No Independent third-party scripts (analytics)
    type="module" Deferred by default Yes Modern ES modules (Joomla core uses this)

    With WAM, pass these as attributes, for example ['defer' => true] or ['type' => 'module']. For tracking scripts, respect consent: see disabling cookies for visitors.

    What about Document::addScript()?

    It still works, but it’s deprecated. In both the Joomla 5.4.10 and 6.2.0 source, addScript() and addScriptDeclaration() are marked @deprecated 4.3 will be removed in 7.0. When you touch old code, replace them with registerAndUseScript() and addInlineScript(). If an old extension also uses removed classes, see fixing Class JRequest not found.

    What changed in Joomla 6.2?

    Joomla 6.2 changes relevant to adding custom JavaScript

    For custom JavaScript, very little. I compared the 6.2.0 package with 5.4.10:

    • The libraries/src/WebAsset classes are identical.
    • Cassiopeia’s index.php is identical, so user.js works the same way.
    • The HTTP Headers plugin adds a Reporting-Endpoints header option.

    Code you write for Joomla 5 with the Web Asset Manager carries over to Joomla 6.

    Troubleshooting

    Symptom Cause Fix
    user.js not in page source Wrong folder, or a non-Cassiopeia template Use media/templates/site/cassiopeia/js/user.js; other templates need WAM
    Edits to user.js don’t show Browser cache; the media version didn’t change Hard-reload; clear Joomla and CDN cache
    <script> vanished after saving TinyMCE or the Text Filter Use Editor – None or CodeMirror; check Text Filters
    Console: “violates the following Content Security Policy directive” Raw script without a nonce, or host not in script-src Load it through WAM; add the host
    Joomla is not defined Script runs before core.js Add ['core'] as a dependency
    null when selecting elements Ran before the DOM was ready Use defer or DOMContentLoaded
    CDN URL has ?abc123 appended WAM versioning ['version' => false]
    Script gone after a Joomla update Edited a core template file Move it to a child template, override or user.js
    Script loads twice Added by both a module and the template Use one method; WAM de-duplicates by asset name

    FAQs

    Where is user.js in Joomla 5?

    It doesn’t exist until you create it at media/templates/site/cassiopeia/js/user.js. Cassiopeia then loads it automatically.

    Does user.js survive Joomla updates?

    Yes. Joomla doesn’t ship a user.js, so updates don’t overwrite it. The 6.2.0 package doesn’t include one either.

    Is the Web Asset Manager required?

    Not strictly, but it’s the supported API. It handles dependencies, load order, versioning and CSP nonces. addScript() is deprecated and due for removal in Joomla 7.

    How do I add Google Analytics or Tag Manager?

    Register the vendor URL with WAM, using async and 'version' => false. Put the config snippet in addInlineScript(), and add the vendor hosts to your CSP. Load it only after consent if you need consent.

    Can I add JavaScript to a single article?

    Use a template override of the article view with a menu-item check, or a Custom HTML module assigned to that menu item. Don’t paste scripts into the article text.

    Why does my script work for Super Users but not for editors?

    Different user groups have different Text Filters. A lower group’s filter can strip <script> when they save the module or article.

    What is the difference between addInlineScript and addScriptDeclaration?

    addInlineScript() is the Web Asset Manager method, and it gets the CSP nonce. addScriptDeclaration() is the deprecated Document method.

    Can I load ES modules?

    Yes. Pass ['type' => 'module'] as an attribute. Joomla’s own scripts, such as template.min.js, load this way.

    Is there a no-code option with page exclusions?

    Yes. A system plugin such as Easy Includes lets you add JS and CSS from plugin settings on Joomla 4, 5 and 6. It can skip pages by user group, component or URL fragment. It doesn’t target single menu items, so use an override for one-page scripts. Setup steps are in the getting-started guide.

    Can you add or clean up scripts for me?

    Yes. We move hard-coded scripts into the Web Asset Manager, enable CSP and fix load-order bugs. We do this on its own or as part of a Joomla upgrade. Server settings that affect scripts are covered in Joomla php.ini settings.