Overview
By default, XenForo updates its route filter cache automatically whenever you add, edit, or remove route filters. However, if the standard “Rebuild Caches” option in the Admin CP is not clearing out old route filters (or not applying new ones properly), you can force a rebuild by enabling XenForo’s “Development mode” and running a CLI command. This guide shows you how.Important Notes
• Development mode is meant primarily for development and testing, not for everyday use on a live forum.• Use this method only if the standard Admin CP “Rebuild Caches” approach is failing to update route filters.
• After you finish, it’s strongly recommended that you disable dev mode again.
Step 1: Enable Development Mode
1. Connect to your server via SSH or use a tool that allows you to edit files on your server.2. Locate and open XenForo’s primary configuration file, typically at:
src/config.php
3. In that file, add (or uncomment) the following line inside the
<?php block:
Code:
$config['development']['enabled'] = true;

4. Save the changes and close the file.

Your XenForo installation is now in development mode.
Step 2: Run the Rebuild Command
1. Make sure you are in the XenForo root directory (where cmd.php or cli.php is located).For cpanel go to public html with:
Code:
cd /home/username/public_html
2. From the command line, run:
Code:
php cmd.php xf-dev:rebuild-caches
3. XenForo will now rebuild various internal caches, including those related to route filters.
Step 3: Disable Development Mode (Recommended)
Once the rebuild completes, it’s best to revert to standard (non-dev) mode on a production site:1. Reopen src/config.php.
2. Comment out or remove the line:
$config[‘development’][‘enabled’] = true;
3. Save and close the file.
You have now disabled development mode.
Conclusion
After completing these steps, old route filters should no longer appear, and any new or modified filters will be fully recognized by XenForo. If issues persist, ensure there is no CDN or server-level caching (such as .htaccess rewrites) still serving outdated routes.
Last edited: