1

init is the recommended hook and no, the rewrite rules will not be overwritten each time the hook fires or that the page is loaded, unless if you call flush_rewrite_rules() or WP_Rewrite::flush_rules() in your callback. add_action( 'init', 'add_my_rewrite_rules' ); function add_my_rewrite_rules() { add_rewrite_rule( ... ); flush_rewrite_rules(); // ...


Only top voted, non community-wiki answers of a minimum length are eligible