A quick way to clear the redirect list in Joomla
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
- Redirecting a folder using Apache redirects
- Removing obsolete database tables from your Joomla site.
- Fabrik for joomla 2.1 to 3.x migration.
- Removing spaces from filenames in Joomla sites
- Did you forget your adminexile key (Joomla)
- Deleting COM_INSTALLER_TYPE_ entries in the extension manager of a Joomla 3 site
- Accessing an external sql database from a rails app where the schema prefix differs from the schema prefix used for the app’s tables.
- Solved – Menu won’t reorder in Joomla after migration from 1.5