{"id":16320877,"date":"2022-12-26T16:04:45","date_gmt":"2022-12-26T16:04:45","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/permalinks-broken-after-update-2\/"},"modified":"2023-06-21T11:20:47","modified_gmt":"2023-06-21T11:20:47","slug":"permalinks-broken-after-update-2","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/permalinks-broken-after-update-2\/","title":{"rendered":"Permalinks broken after update"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We have a lot of problem with our websites using woocommerce, almost everytime we are making updates of woocommerce, we have to &#8220;re save&#8221; the permalinks because the website is in &#8220;internal server error&#8221; <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And after that everything works like a charm again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are an agency and we are facing this since a looooooong time (5+ years) and multiple servers (allways with apache). We never took time to wrote you about this. We searched the web about this without success, we tried some function to reload permalinks with php after update liek this <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function renewPermalinksOnPluginsUpdate($upgrader_object, $hook_extra, $result) {\n\tflush_rewrite_rules(false);\n}\nadd_filter('upgrader_post_install', 'renewPermalinksOnPluginsUpdate', 10, 3);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or like this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function update_permalinks_on_plugin_update($upgrader_object, $options) {\n\tif($options&#091;'action'] == 'update' &amp;&amp; $options&#091;'type'] == 'plugin') {\n\t\t$permalink_structure = get_option('permalink_structure');\n\t\tupdate_option('permalink_structure', $permalink_structure);\n\t\tflush_rewrite_rules();\n\t}\n}\nadd_action('upgrader_process_complete', 'update_permalinks_on_plugin_update', 10, 2);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">but it doesn&#8217;t work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do you have an idea for us ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks<\/p>\n","protected":false},"template":"","class_list":["post-16320877","topic","type-topic","status-closed","hentry","topic-tag-permalinks","topic-tag-redirect","topic-tag-update"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16320877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16320877\/revisions"}],"predecessor-version":[{"id":16320880,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16320877\/revisions\/16320880"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16320877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}