Why You Should Only Use SEF Links in Your Content

When migrating a website from a version of Joomla to another version, one of the extremely challenging issues that we face is maintaining the link structure. Yes, we know, having the same link structure should be seamless when migrating a Joomla website, but in most cases, it is not. Here’s why…

Many Joomla administrators use non-SEF links for linking to other pages. For example, if they want to link to a certain article, they use the following link: index.php?option=com_content&view=article&ItemId=101&id=5, which is then translated by the SEF system plugin to something like http://www.[joomla-website].com/my-fifth-article.html. Now, this practice is OK when you want to keep the same website and the same Joomla version forever, but it fails miserably the second you want to migrate to a different version of Joomla. Let us explain further…

When you migrate a Joomla website to a different version, it is sometimes impossible to maintain the same IDs in the new version without a lot of manual work. For example, the ID of the article will not be the same, as well as the ItemId of the menu item pointing to that article (or the category of the article). Hence, when the SEF system plugin runs on the same non-SEF URL above on the new website, the resulting SEF URL may be completely different (or may not even work, especially if the old ID of the article no longer exists in the migrated website). This issue alone frustrates Joomla administrators the first time they attempt a migration which results in them reverting back to the previous version of Joomla and hoping that the world will end before their Joomla website gets hacked (a website using an old version of Joomla is just waiting to be hacked, if it’s not already hacked).

So, what’s the solution to this problem?

Well, the ideal solution is to always use SEF links to point to your content (articles, categories, contacts, etc…) from within your content, instead of using non-SEF links.

But, if you’re already at the point where it’s too late (you’re migrating your Joomla website and you have non-SEF links in your content), then you have 2 options:

      Create a script that will replace non-SEF links with SEF links in your old content before migrating your content to your new Joomla website.

    1. Create a script that will replace old IDs with new IDs and old ItemIds with new ItemIds after migrating your content to your new Joomla website.

    We prefer the first option over the second option, although both will take more or less the same time. The first option is better, in our opinion, because it will get rid of the problem once and for all. If you use the second option, then you will run into the same problem when you migrate your Joomla website to a newer version in the future.

    If you need help implementing any of the solutions above, then that’s what we’re here for. Just contact us and rest assured that we will do the work for you promptly, professionally, and for a very competitive fee!

No comments yet.

Leave a comment