• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

WP-Toolkit update broke permalinks

We face the same issue here. I was wondering if the wp function flush_rewrite_rules() could be a solution for all of us by placing it in an according wordpress hook. But I can‘t figure out which hook should be used :S Has anybody an idea? Or is the shell script with a cron runner the only solution at the moment?

Btw. I refer to the thread start initial issue that permalinks of crp are broken after wptoolkit do his magic automated stuff.
 
We face the same issue here. I was wondering if the wp function flush_rewrite_rules() could be a solution for all of us by placing it in an according wordpress hook. But I can‘t figure out which hook should be used :S Has anybody an idea? Or is the shell script with a cron runner the only solution at the moment?

Btw. I refer to the thread start initial issue that permalinks of crp are broken after wptoolkit do his magic automated stuff.

That's what I tried to do and was pretty sure it would solve this issue. But, it didn't.
Maybe the "upgrader_process_complete" isn't the right hook in this case. This is the code I used:

Code:
function do_rewrites() {
  flush_rewrite_rules();
}

add_action( 'after_switch_theme', 'do_rewrites' );
add_action( 'upgrader_process_complete', 'do_rewrites' );
 
  • Like
Reactions: sp7
That's what I tried to do and was pretty sure it would solve this issue. But, it didn't.
Maybe the "upgrader_process_complete" isn't the right hook in this case. This is the code I used:

Code:
function do_rewrites() {
  flush_rewrite_rules();
}

add_action( 'after_switch_theme', 'do_rewrites' );
add_action( 'upgrader_process_complete', 'do_rewrites' );

Thanks for your response. Such bad luck we just wanted to try the after_switch_theme. Than we search on for other hooks. Mean a while hopefully someone find a hook or a handy workaround that could solve this issue. A cron with a low interval is too consuming :/

Edit: The latest solution we faced in our agency for that is to disable the whole automatic update functionallity and create a weekly cron script that fires the update of all instances manually and afterwards rebuilds the permalinks over the shell script above.
 
Last edited:
Back
Top