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

  • The update process didn't complete successfully and some files appears to be corrupted, try reinstalling WP.
    – 99teko
    Aug 18, 2016 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?
    – Shaheer
    Aug 18, 2016 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, 2016 at 13:34
  • now I'm getting the same error on every page of my website
    – Shaheer
    Aug 18, 2016 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, 2016 at 11:56

1 Answer 1


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 agree to our terms of service, privacy policy and cookie policy

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