July 21

0 comments

A quick way to clear the redirect list in Joomla

By Christopher Mendla

July 21, 2015


Last Updated on November 30, 2019 by Christopher G Mendla

I have a site that has been around for a while. The Joomla Redirect tool allows you to redirect calls to certain URLs to other urls. This can be handy when you change your structure or take other action that causes people to try to access incorrect URLs.

The problem was that over the years, the redirect table had gotten huge. Going through and deleting the old entries page by page would have taken a good bit of time.

I found an article on using an SQL statement to clear all but the enabled links. This presupposes that you can use PhpMyAdmin to get to the tables.

NOTE – before doing anything like this, you should make a current backup of your site (I use Akeeba Backup Pro)

You simply use PhpMyAdmin to go to the table in question and execute the following command

DELETE FROM `PREFIX_redirect_links` WHERE `published` IN (0,2,-2)

Substitute your Joomla prefix for PREFIX

When you execute the command, it should clean up your redirects table.

I found the original idea at
http://www.eugenesivokon.com/how-to-purge-all-unnecessary-urls-of-joomla-redirect-component

Christopher Mendla

About the author

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}