• 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

VirtualCed

New Pleskian
At least with the plugins installed on my websites, after months of investigation, it's now clear after a wp-toolkit plugins/themes upgrade, lots of sites have the permalinks broken.
To fix it, I have to save the permalink structure.
I can either do it on each site but just found I can solve it in command-line with

plesk ext wp-toolkit --wp-cli -instance-id 3 -- rewrite flush

I'm looking for an easy way to do this on every wp instance.

I know I can list the instances using

plesk ext wp-toolkit --list

I guess it should be doing in a script, displaying each instance number (awk or cut), then making a loop (for each) but I'd like to know if there is a solution to make this look easily ?

I need to do something like

for each wpinstance, do plesk ext wp-toolkit --wp-cli -instance-id $wpinstance -- rewrite flush ;done

Any suggestion ?
 
At least with the plugins installed on my websites, after months of investigation, it's now clear after a wp-toolkit plugins/themes upgrade, lots of sites have the permalinks broken.
To fix it, I have to save the permalink structure.
I can either do it on each site but just found I can solve it in command-line with

plesk ext wp-toolkit --wp-cli -instance-id 3 -- rewrite flush

I'm looking for an easy way to do this on every wp instance.

I know I can list the instances using

plesk ext wp-toolkit --list

I guess it should be doing in a script, displaying each instance number (awk or cut), then making a loop (for each) but I'd like to know if there is a solution to make this look easily ?

I need to do something like

for each wpinstance, do plesk ext wp-toolkit --wp-cli -instance-id $wpinstance -- rewrite flush ;done

Any suggestion ?
Didn't you more or less write it already?
Or are you missing the bash skills to implement it?

When I'm behind a computer I will write it for you...

EDIT

cat /usr/local/sbin/rewrite_wp
Code:
#!/bin/bash
TMP1=`mktemp`
plesk ext wp-toolkit --list | awk '{print $1}' | grep '^[1-9]' >${TMP1}

while read INSTANCE ; do
  plesk ext wp-toolkit --wp-cli -instance-id ${INSTANCE} -- rewrite flush
done<${TMP1}
rm ${TMP1}
 
Last edited:
Oh dear, is this the source of that conflict? Since months I'm searching for that bug in many of my WordPress instances...
The problem is the following: It seems that after a not defined amount of time the permalinks were broken, which means that every permalink, which redirects to a custom post type (like: https://example.com/prices/cars) did not redirect to that specific page anymore. Instead of that anticipated behavior they redirected to the home page. After manually saving the permalinks in WordPress settings everything is working fine again...
I developed many WordPress websites including different plugins and different source code. The nearly only common base was the Plesk WP Toolkit...

Let me know, if I can support you by fixing that bug in WP Toolkit. Btw..: Is WP toolkit flushing the permalink structure after updating core / plugins? If this is not the case, probably it would be a good approach..

flex
 
I see that this is still an issue, at least for some of our sites. I like the flushing at the end of updates, although I am not sure how some of other people's sites would react to that. I just got an email from a couple of clients that had "lost their pages" and since I was aware of this I was able to quickly solve this by saving on the permalink screen, but it's stressful to have to worry about this especially with a growing pool of sites.

Anybody knows what's the source of that? helpful bash script though. thanks!
 
We are having the same problems. Custom Post Types return a 404 error and resaving the permalinks fixes the problems. To be honest, this is a really serious problem and a bit unnerving that this thread is over 2 years old.
 
After using the WordPress Toolkit "Secure" feature today, we did also run into the same problem. Permalinks do not work at all anymore. Also saving them again did not help anymore. We are now investigating the problem. Revert the rules did not help. File permissions looking all good. Rewrite rules are still in place. I will give feedback, if we can find a solution.
 
The Toolkit did break the Webserver config of Plesk. In our case a simple subdomain config is now 25 kByte bigger than before. A lot of other rewrite rules from other subdomains were added, that should not be here. This problem can only be solved by a fast bugfix from Plesk. We will now make a quick work-around by manually "cleaning" the config and then restart the webservers because deactivating the WordPress Toolkit is no option at the moment.
 
FYI: We did found a quick solution / work-around till a patch is published. See my statement here:


Just switch back from the Apache "<DirectoryMatch>" directive to the "<Directory>" directive for the config files broken / affected ("/var/www/vhosts/system/*/conf/httpd.conf") and restart the Apache manually.
 
FYI: We did found a quick solution / work-around till a patch is published. See my statement here:


Just switch back from the Apache "<DirectoryMatch>" directive to the "<Directory>" directive for the config files broken / affected ("/var/www/vhosts/system/*/conf/httpd.conf") and restart the Apache manually.

Hello Hangover2, I'm not an expert in server configuration and I can't figure out how I can go back to <Directory>. Is it possible to do it visually via the PLESK interface or via the terminal?

Thanks for your help
 
The problem was solved with the new release 4.8.2-3642 that was published some hours ago.
My quick fix could not be done by Plesk Interface only via SSH terminal (and knowledge about Linux server administration).
 
I still have this problem today and this is causing me huge problems with many custom websites.
I got the latest version 4.8.2-3642 and my websites who have custom links are still broken and returning a 404 error.
 
Last edited:
My only solution for the time was to uninstal wpToolkit, and deactivate the pretty URL's on my affected websites, and everything is working.
And ofcourse now I need to spend more time to re-enable and fix the permalinks to be pretty once more.
 
This is also happening on our Plesk servers and it gave us a lot of headaches.
I thought it was related to one of the plugins we use, made a list of suspects but over time that list shrunk to zero because it was happening on sites that do not share the same plugins.
Then I noticed it doesn't happen on sites that are on cPanel and updated via InfiniteWP. So it is definitely related to Plesk and WP Toolkit.

I was not able to solve it, but after reading this post I hoped that it was fixed in new versions of WP toolkit, but it happened again yesterday.
 
This is also happening on our Plesk servers and it gave us a lot of headaches.
I thought it was related to one of the plugins we use, made a list of suspects but over time that list shrunk to zero because it was happening on sites that do not share the same plugins.
Then I noticed it doesn't happen on sites that are on cPanel and updated via InfiniteWP. So it is definitely related to Plesk and WP Toolkit.

I was not able to solve it, but after reading this post I hoped that it was fixed in new versions of WP toolkit, but it happened again yesterday.

Even if they had announched here that this was fixed, I can say it was not fixed.
And thats why you are also having this problem.
No matter how helpful the WP Toolkit is, I have uninstalled it, and since then all my websites and permalinks are working fine like before.
I would advise you to do the same, and wait for a couple of more version releases and upgrades before you reinstall it.
Seems like its a problem not that easy to be fixed for all cases.
 
Back
Top