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?