Updating SEO Yoast through MainWP breaks permalinks
April 10 Update: MainWP Support found the issue. Apparently there was conflict between the way MainWP handles updates and the way WordPress SEO by Yoast updates when custom post types were involved. The latest version of both the MainWP Dashboard (2.0.10) and MainWP Child (2.0.10) adds additional checks for these types of updates.
April 1 Update: Turns out the steps below don’t actually fix it. The Yoast SEO plugin update today broke a couple of sites yet again. MainWP Support is looking into the issue, I’ll report back when something new arises.
We use MainWP to manage a few clients websites – keep the sites backed up and updated (among other things). Recently we’ve had issues with certain sites Custom Post Type permalinks breaking, resulting in 404 pages on the single page view. Visiting the permalinks page in WordPress would instantly fix it, but clients generally don’t like it when their site is periodically broken.
It took a bit of troubleshooting to find the culprit, but it turned out to be related to two things:
- Updating Yoast SEO plugin
- Updating the plugin remotely, through MainWP. Updating Yoast SEO through the WP update page did not break the permalinks.
I was able to reproduce the issue with the following steps on a broken site:
- Deactivate the (now updated) Yoast SEO plugin
- Replace the updated plugin with an older version via FTP
- Reactivate plugin
- Update plugin via MainWP Dashboard
- Permalinks broken
After a bit of trial and error we were able to fix this issue following these steps:
- Fix permalink issue by visiting permalinks page in WP
- Leave Yoast  plugin active
- Delete now updated version of plugin via FTP, including directory folder
- Upload older version via FTP
- Updat to new version via MainWP
- Permalinks NOT broken – Yay!
The reason I went through the trouble to delete the plugin and upload an older version through FTP was to test that the remote update no longer broke the permalinks. It’s entirely possible that simply deleting and re-uploading would fix the issue.
What went wrong?
It’s very hard to say really. I won’t blame either MainWP or Yoast for this. It happened to only a couple of websites and not all that we manage – and nearly everyone has Yoast installed. My guess is there were legacy files in the older versions of Yoast that were not necessary. The only reason I say this is because deleting the plugin via FTP resulted in a few file-not-found errors. Refreshing the directories revealed all files and then could be deleted.
I checked with MainWP support and they haven’t had anyone else report this issue. And I know better than to put in a support request with Yoast.
Has anyone else experienced this issue?
I found your post on Google* \”yoast seo breaking permalinks for custom post types\”, so well done. I tried this search after suspicions myself, dating back about a month after several client updates, and it being pointed out to us by some of the owners/editors.
I agree that it\’s sort of hit and miss, but drilled to the same conclusion. I thought as well that it may have been concurrent with mainwp updating their own child plugin… but between them and Yoast if it\’s not a real rash of tickets it makes it harder for them to provide a fix for isolated glitchy behavior.
Since it does hamper you with the white screen in admin, I just go on the server and rename the plugin file (wordpress-seoTMP). At this point it will let me log back in normally to the dashboard, rename the file back on the server and it works, saving the need for deleting and re-uploading.
Thanks for helping me from going crazy thinking I was alone on this one:)
cheers
stu
Hi Stu,
Yeah, I thought I was going crazy too. It took a couple of tickets at MainWP to get them to take a look, and I wouldn\’t even consider asking Yoast about it.
I\’ve not had an issue since the update. Updated a bunch of sites today to the latest WordPress SEO without a hitch.
Yes, today was rather big. I found when updating our sites plus WP itself was about 120 mainwp actions, which included the latest Yoast Version. I found that restarting php-fpm (on nginx) after I ran mainwp, stopped any of the sites from hiccuping / white screening (and they were). It may well be that what you said about both houses got it all in order and we\’ll definitely know next time.