Posts with one or more comments result in error after data import

I created a copy of a clients’ WordPress site in a hidden folder. It uses a copy of the database, not the live DB. On the copy, I upgraded WordPress from 3.9.2 to 4.0 and upgraded all plugins. I also created a new page in the copied site.

While this was going on, 3 new comments were posted on the live site all on the same post and were not yet approved. I created a temporary post category and used that as a condition to export the post (along with its comments). Next I imported the post into the copied site. I checked and the import overwrote or replaced the earlier version of itself that was already in the DB. In the WP Admin, I verified the new unapproved comments were indeed there. I navigated to the post in the WP admin and unchecked the temporary category, resaved the post and then deleted this temporary category.

At this point I probably should have looked at the post itself but I didn’t think to do so - I figured since it was fine in the admin,o it should be fine in the website. So I used a plugin called Duplicator which I’ve used many times before to download a copy of the modified/updated site, I erased the live site and then used the Duplicator installer to copy my modified version of the site into the live folder/database (it automatically overwrites the target database).

I tested and everything seemed fine but had not looked at any posts that had comments. A day later I discovered that any post that has a comment results in a 500 Internal Server Error when I try to open the URL. It displays fine in the WP Admin and I can see all the comments in the WP Admin but I can’t open the post itself.

I’ve searched for a solution and the only thing I can find is to rebuild the htaccess file. I’ve tried that but it does not fix my problem.

Can anyone give me some advice here of how I can fix this? I’m really desperate to get this repaired ASAP.

Eric

My problem has been fixed. In case anyone reads this looking for a solution to a similar problem, I thought I’d report back on how I fixed this problem. It turned out that upgrading to WordPress 4.0 caused my theme to break. I’m using Thesis 1.8.5. My host helped me trace the problem to comments.php and that lead me to the following message thread with solution over in the WordPress support forums: https://wordpress.org/support/topic/500-server-error-after-upgrade-to-wordpress-40

Eric