What are the rewrite rules?
If for example, you visit https://yourwebsite.com/index.php?p=345, WordPress will retrieve the content of the post ID = 345 from the database. This is called “plain permalink structure”.
Usually, WordPress websites use prettier permalink structures that give the possibility to retrieve the content from the database starting from a pretty URL like https://yourwebsite.com/about.
Supposing the page “about” has the ID = 345, and that there is a system that translates “about” in …index.php?p = 345, hence ID = 345, we can write https://yourwebsite.com/about and see the content of that page that has the ID 345.
The rewrite rules are nothing else than a system to translate pretty permalinks like https://yourwebsite.com/about in URLs that are understandable by WordPress like https://yourwebsite.com/index.php?p=345.
The core of WordPress has its native rewrite rules, and additional rules can be added via code by the plugins.
For example, an LMS plugin may add a rewrite rule that allows you to write https://yourwebsite.com/courses/sample-course/sample-lesson and retrieve the content of the lesson sample-lesson.
Without rewrite rules, you should always write ugly URLs like https://yourwebsite.com/index.php?post_type=lesson&p=564.
The rewrite rules are stored in the database. If the rewrite rules information is missing from the database WordPress creates the rewrite rules taking into account the code of the core, the plugins, and the theme, and then saves the information into the database.
Normally, at every page load, the rewrite rules are available from the database. They are not available only if they were never stored or they were flushed.
Why do you see a warning about the rewrite rules?
FDP allows the user to specifically disable other plugins on specific pages.
Imagine on the page “sample-page” you disable plugins A and B but you keep them active globally.
If those plugins add some rewrite rules, and a third plugin flushes the rewrite rules when someone visits “sample-page”, the new rewrite rules miss those rules added by plugins A and B. WordPress would regenerate them and save them into the database missing some rules.
To avoid this issue, FDP when detecting the flushing of the rewrite rules during a normal page load, calls the homepage behind the scenes enabling all the plugins, and saves the rewrite rules, but this time being careful no rule is missed. If it didn’t you may have missing rewrite rules and 404 page errors navigating your site.
This operation of course will consume resources. Don’t think it consumes like a normal page load because FDP would call only the HTML document in the background. A document is usually not more than 30 kB. Of course, no assets will be called. However better to avoid that and be sure no plugin flushes the rewrite rules during a page request.
The rewrite rules have to be flushed only during operations that have no impact on normal page loads, like on plugin activation, when a plugin saves the settings, and so on.
If FDP gives you the notice about the rewrite rules you should contact the author of the plugin and ask why they flush the rewrite rules during a page load. Maybe you can link this page to clarify why this is an issue, especially if FDP is running, but also without FDP. There is no reason to flush the rewrite rules on page load. Flushing, regenerating again, and saving them into the database is an expensive operation even without FDP. No plugin should do that.
What to do if I see the notice about the rewrite rules?
If after dismissing the notice about the rewrite rules the same warning appears over again and again, you should ask for support from the author of the plugin that is mentioned in the warning.
We suggest you share the code included in the notice.
Usually, when a plugin flushes the rewrite rules during a page load is because they didn’t notice the issue.
For them is usually very easy to solve the issue. They just need to flush the rewrite rules on plugin activation, or maybe when they save the settings. Practically no plugin needs to flush the rewrite rules during a page load.
You can propose they use the hook “register_activation_hook” to run their code to flush the rewrite rules.