How We Got Rid of sh404SEF on a Major Website

A major website that we manage used sh404SEF heavily for SEF links. Although we don’t think highly of sh404SEF, we were hesitant to remove it (despite its many issues) because the website was highly dependent on it.

However, we were courageous enough to make the brave decision (OK, now we’re flattering ourselves) to dump sh404SEF when migrating that website from Joomla 2.5.27 to Joomla 3.36!

Here’s what we did (note that we did not update the website from within the CMS):

  • We created a fresh install of Joomla 3.3.6.
  • We installed all the extensions (with the exception of sh404SEF).

  • We imported all the data.

(Of course the above steps included so many details, but they are mostly outside the scope of this post.)

Once the new website was functioning, we started comparing the high level links, and we ensured that all the high level links (that were created in sh404SEF) were created as menu items.

We then monitored, for a full week, the Crawl Errors in the Google Webmaster Tools account for that website, and fixed any 404s (either by creating a hidden menu item or by creating a redirect rule in the .htaccess file) until the number of 404 errors returned to a normal level (there are 404s that are the result of erroneous linking from external websites, and, in many occasions, it is not worth it to address these 404s).

Once that was done, we considered our mission to be a successful one and we proved to ourselves (and to the whole world) that it’s possible to get rid of sh404SEF (even after using it for over several years) and to simply use Joomla’s core SEF (which is not perfect, but way better and much more efficient than sh404SEF).

Did we have any major issues with this move?

Yes – we did, but just one. About 4,000 aliases ended with a hyphen (or a dash, or a minus, or a , or a… OK, you get the point!), and it was because when the associated articles were created, they contained a space at the end of their titles (spaces in the title get translated to hyphens in the alias). Now, we did modify sh404SEF for that website to ignore the trailing hyphen in the URL, which meant that Google indexed (and rightly so) the URLs without their trailing hyphens, which, in its turn, meant that a link such as http://ourclientjoomlawebsite.com/category/first-article.html no longer worked, because the actual link was http://ourclientjoomlawebsite.com/category/first-article-.html. We had 2 options to solve this problem: 1) Create a plugin that will automatically redirect from the hyphened version of the URL to the non-hyphened version, or 2) fix the aliases.

We figured that the second option was much easier and much cleaner/efficient. So, we logged in to phpMyAdmin and ran the following query:

UPDATE #__content SET alias=SUBSTRING(`alias`, 1, CHAR_LENGTH(`alias`) -1) WHERE alias LIKE '%-';

And that, ladies and gentlemen, fixed the problem!

If you got tired of sh404SEF and its endless problems, then try removing it by following our advices above. If you’re a bit frightened to do that, then let us do it for you. We don’t charge much, our work is clean and professional, and we’re always a phone call or an email away!

No comments yet.

Leave a comment