• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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