Recently we were asked by a client how best to go through their Joomla CMS website and clean out old content that might be lingering from previous iterations of their website, or unfinished blog posts, and even some older content that was showing up on google search that they no longer wanted appearing. Here is a run down of what we suggested they do to spring clean the content from their Joomla website, and the same strategy can be applied for cleaning out old menu items, modules and content from 3rd party Joomla extensions too.
Managing Joomla Trash
A good strategy I find is to delete anything currently in the trash on the assumption that if it's been sitting in the trash for a while and nobody has complained or there have been no issues then it is very likely these items are actual trash and are no longer needed. That gives us an empty trash as a base point for spring cleaning. In Joomla, there are separate trashes for Content items, Menu items, and Modules and it's very useful to have these separated out like this but the clean up strategy is the same for each. I'll call all of the things in each of these areas 'items'. Before you proceed remember it's always a good idea to manually run a Joomla backup before embarking on any significant changes in your Joomla website.
An emptied trash leaves you with items in your system that are unpublished and items that are published. Some unpublished items are sitting there because you haven't finished writing/editing them or you want to keep them to re-publish later. Some are old and can be trashed. Now you can send those to the trash knowing you can leave them there for a week, a month or however long you feel is right for your situation, before fully deleting them by emptying the trash. The trash will not empty itself automatically so items will remain there until you or someone else deletes the items from the trash. All of these actions will help get rid of the items themselves and the record of them that Google has indexed which you will also no longer want. It's helpful to do this before a migration, re-organization of content, or navigation project, because you get to know your content better and knowing your content will allow you to leverage the assets you have i your new project.
Note that this sort of 'spring clean' will likely increase the number of "404 errors" and you may see reports of increased 404's in Google Search Console. Though they're often referred to as 'Errors' a 404 is a perfectly valid state for a server to report. Things get moved and deleted all the time, a 404 just means the server can't find what was requested, so it is only an actual problem if what the server is looking for should really be there, like if you accidentally unpublished a link to an active campaign. Google will check two or three times for an item it has previously indexed before removing it from its index. During that period, things we delete or move can show up as 404 which is expected and nothing to worry about.
Moving Joomla items instead of trashing them?
Sometimes you have items in a category that you want to get rid of but instead of trashing both the items and the category you might want to move some of the items into a different category, such as consolidating content from other categories into a simple 'News' category. For items that are old and you don't want you can unpublish and trash them. For ones you want to keep, you can simply change the category to the 'News' category to move them over. The batch feature in Joomla is very useful to move lots of items at once. On the front end these items will be listed back with old news items like all the others. After you have cleared out the category and deleted any content from it, then you can trash and delete the category itself.
Should I add Joomla redirects?
You can use the redirects extension (Components > Redirects) to send old traffic to new places, useful in cases where you've moved a content item. However, for most of those the benefit of bothering with the redirect will likely not outweigh the extra effort of doing this part. The redirect extension picks up any request for any item whether it ever existed or not. For example a common top 404 listed in the Joomla redirects extension tends to be 'wp-login.php'. This is the actually administrator login location for Wordpress CMS, and entirely different website software application. This often appears here because bots request it to see if a website is using Wordpress, so they might later try to attack the site in some way. Most of the URLs in the Redirects extension tend to be like this - they never existed. Any that do exist and are 404s will be soon removed by Google in any case and its moved version will be picked up so there is often very little value in adding redirects. The exception is when you have an important item that has been moved that receives significant active traffic. That is when you want to put a redirect in place. So for this sort of clean up, its typically unnecessary.
Once you have moved all of the items you think you won't ever need again into the trash, you can empty the trash at that point or choose to wait until your next spring clean and empty them before beginning. Items in trash can be restored at anytime, they only become irrecoverable once you empty the trash and remember - you ran a backup before beginning so you should also have that to fall back on in extreme situations.