PHP-JEXEC-001

defined('_JEXEC') or die;

defined('_JEXEC') or die;

This is not deprecated. Direct-hit PHP files without it are a security hole on every Joomla version. Do not delete it while “cleaning J3”.

defined('_JEXEC') or die;Keep it on every entry PHP file

Dies at Joomla 3 → 4J3: Works nativelyJ4: Works nativelyJ6: Works nativelyBC plugin: not applicableArchitecture change — no auto-fixPHP

Symptoms people search

restricted access · _JEXEC

Replace this code

Swap defined('_JEXEC') or die; for Keep it on every entry PHP file.

Joomla 3

Remove or stop calling this

defined('_JEXEC') or die('Restricted access');

Joomla 4 / 6

Use this instead

defined('_JEXEC') or die;

How to fix it

  1. 1Keep _JEXEC on every web-reachable PHP file except the real entry points.

Also known as

_JEXEC · defined('_JEXEC') · Restricted access

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.