0

today I updated my wordpress to latest version but the update didnt complete & all the pages were throwing maintenance message so I deleted the maintenance file from the server, now I can access the index.php but still all other pages are disabled. I enabled the php debugging here's the error message

Fatal error: Class 'WP_Post_Type' not found in /home/******/public_html/shaheer.xyz/wp-includes/post.php on line 1031

Please help me with this

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • The update process didn't complete successfully and some files appears to be corrupted, try reinstalling WP. – 99teko Aug 18 '16 at 13:18
  • @OmarSoliman Its a really old website with a lot of customers, I'm afraid reinstalling is not an option for me. Is there anything else I can do about this? – Shah Ahmad Shaheer Aug 18 '16 at 13:28
  • Yes you can, download latest version of WordPress and unzip the archive, then connect to your website FTP and upload the wp-includes and wp-admin folders, if you were asked to replace existing files, do it, also do not mess with wp-content or the database. and one more thing, try to do a backup first if possible. – 99teko Aug 18 '16 at 13:34
  • now I'm getting the same error on every page of my website – Shah Ahmad Shaheer Aug 18 '16 at 16:12
  • Same error? Fatal error: Class 'WP_Post_Type' not found in /home/******/public_html/shaheer.xyz/wp-includes/post.php on line 1031 ? – 99teko Aug 19 '16 at 11:56
0

I had just changed the version number in version.php back to 4.5.3 (was playing with wp-cli but don't ask why, LOL) and saw this exact error -- Googled it and saw this post.

My bet is your version.php didn't get updated. Look in it and check the version number to see if it is what it should be.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.