PHP-JIMPORT-001

jimport('joomla.filesystem.file')

jimport() autoloader calls

jimport() was how Joomla 1.5–3 loaded classes. Joomla 4 uses Composer PSR-4. The function is gone. No plugin restores it.

jimport('joomla.filesystem.file')use Joomla\CMS\Filesystem\File;

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

What you will see

  • Call to undefined function jimport()
  • Call to undefined function jimport

Symptoms people search

undefined function jimport · install script dies on Joomla 4

Replace this code

Swap jimport('joomla.filesystem.file') for use Joomla\CMS\Filesystem\File;.

Joomla 3

Remove or stop calling this

jimport('joomla.filesystem.file');
JFile::copy($src, $dest);

Joomla 4 / 6

Use this instead

use Joomla\CMS\Filesystem\File;

File::copy($src, $dest);

How to fix it

  1. 1Delete every jimport() line.
  2. 2Add a use statement for the namespaced class.
  3. 3Replace JFile/JFolder/JPath with File/Folder/Path.

Also known as

jimport · joomla.filesystem

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.