Remove the article ID from Joomla content article URLs when SEF is enabled

Remove the article ID from Joomla content article URLs when SEF is enabled

If your Joomla site is not equipped with a super SEO app that will strip away that very visible article ID: /34-the-great-article-title-alias, Joomla 3 does have a 'hidden' parameter to make the URL read as /the-great-article-title-alias, but it requires some effort, and is worth it. Once done, it's yours for your everlasting Joomla life.

Create A Plugin For The Job

A System plugin will serve best for the task because it is loaded globally, unless instructed otherwise.

1. Create the folder which will contain all the files and give it a relative name

2. Create the primary function file within the folder and keep the name similar to the folder for simplicity

<?php defined('_JEXEC') or die();
* @package      plg_system_strip_article_id
* @copyright   Copyright (C) All rights reserved.
* @license      GNU General Public License version 2 or later; see

class plgSystemStrip_Article_Id extends JPlugin {

      public function onContentPrepareForm($form, $data) {
   // global content configuration form
   if( $form->getName() == 'com_config.component' && JFactory::getApplication()->input->get('component') == 'com_content' ) {
      $form->loadFile('contentconfig', false);


3. Create the installer XML file within the folder and give it the same name as the function file


<?xml version="1.0" encoding="utf-8"?>
<extension version="3.7.0" type="plugin" group="system" method="upgrade">
   <name>System - Strip Article ID</name>
   <copyright>All Rights Reserved.</copyright>
   <license>license GNU/GPLv3</license>
   <description>Strip Article ID From SEF URL</description>
      <filename plugin="strip_article_id">strip_article_id.php</filename>

4. Create the form control which will be shown in the content global configuration under the Articles tab, within the folder.

<?xml version="1.0" encoding="utf-8"?>
   <fieldset name="articles">
      <field name="sef_advanced_link" type="radio" class="btn-group btn-group-yesno" default="1" label="Remove Article ID In URL">
         <option value="1">JYES</option>
         <option value="0">JNO</option>

Be sure to add an empty index.html file to the folder or remove <filename>index.html</filename> from the installer .xml file.

5. Compress the folder as a .zip and install, enable, then go to System > Global Configuration and click Articles. The switch will be at the bottom of the page