Permalinks getting rewritten with every page load
-
We’ve found a significant problem with this plugin which is cause by one line of code.
It is causing the permalinks for the site to be wiped and recreated on every page load.
This is a heavy MySQL query and on busy sites really slows things down.
It is caused by the line
flush_rewrite_rules();found on line 162 of ls_cb_main.php file.This sits inside the register_post function which is fired from the init hook which of course fires on every page load.
To fix this problem, we commented out the line
flush_rewrite_rules();and its now working fine!Can an update please be released for this plugin which will remove this line?
Note – commenting out this line also fixed this problem they had with WPML compatibility. You can see that here https://wordpress.org/support/topic/created-extra-redirects-when-used-with-wpml/
The topic ‘Permalinks getting rewritten with every page load’ is closed to new replies.