Ready to get started?Download WordPress


Error In post.php - Unable to Post New Posts (13 posts)

  1. RealKeithW
    Posted 8 months ago #

    Hey guys,

    I'm suddenly getting the following error when trying to publish a new post from the GUI in the WordPress administrative panel: Warning: Creating default object from empty value in /wp-admin/includes/post.php on line 494

    The following error appears on the top of a fresh "new posting" page. Everything else on the page behaves successfully, but when I go to post (the "Submit for Review" button) it doesn't post live and continues back to the listing of all blog posts like a nothing happened.

    I checked out line 494 of the post.php file and it's right after the else clause of the 'get_default_post_to_edit' function found in the standard post.php file on line 453.

    specifically line 494 is:
    $post->post_content = apply_filters( 'default_content', $post_content, $post );

    I'm not really using anything customized from the standard install pack other than a few plug-ins and a theme. I also trolled the forum a healthy amount and completed the following before posting here:

    1. re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    2. running the upgrade manually via wp-admin/upgrade.php

    I'm pretty stumped at this point. I've been running this blog for a few years and haven't had an error like this before. The rest of the site behaves fine and can be found here.

    Thank You!

  2. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Ask 1 and 1 what version of PHP is running on the server - I've seen some other people with similar problems related to that.

  3. RealKeithW
    Posted 8 months ago #

    WPyogi thanks for the fast reply - I'm currently running PHP 5.4 with a MySQL5 database for this blog.

  4. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Have you tested with ALL plugins deactivated and a default theme active?

  5. RealKeithW
    Posted 8 months ago #

    Yes - I used the admin panel to change to back to default though (didn't manually add -old to the WP files in FTP). Still have the error mentioned above

  6. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Oh sorry, default means a current twenty-something theme that ships with WP. Not sure that's going to change it though.

    And when you reinstalled, you deleted all files and folders (except wp-content, wp-config and .htaccess) first before uploading the new ones? Might be worth trying that again.

  7. RealKeithW
    Posted 8 months ago #

    Just replaced everything except wp-content, wp-config, and .htaccess . Getting Warning: Creating default object from empty value in /homepages/31/d########/htdocs/..(my main site root)../blog/wp-admin/includes/post.php on line 494

    Also decided to go in and check the config file, everything looks all set in that.

    Thanks for all the help so far! Any ideas of next steps?

  8. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    I really don't know - I did find this thread (guessing you did too?)


  9. RealKeithW
    Posted 8 months ago #

    WPyogi I appreciate the help; I'm thinking I might just have to do a manual re-set on the wp-content folder and port everything over...

  10. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Yeah, I wish I had something more to offer - can you set up a new site in a sub-directory and see if you get the same thing on a brand new install?

  11. RealKeithW
    Posted 8 months ago #

    It's more help than I could've done alone =).

    I went ahead and did a brand new install to a new directory with a fresh install and everything works fine. As a bandaid I think I'll just use a new database, wordpress install, and theme with a linkback to my old blog. When I have more time I'll probably see if a file in the database or the wp-config folder got corrupted.

    Thanks again!

  12. ArSimonMa
    Posted 5 months ago #

    Hi RealKeith,
    don't know if you have solved the problem, but I've found this post while I'm searching on internet for the same error and I hope is usefull for someone else.
    After a routine update of the server to the newest version of php my admin page give me that error, so I call the Server's Assistance and they solved the problem modifying some setting that they have changed.

    So this problem may not be referred to a code problem but, otherwise, to a wrong server settings.

    Hope that it will be useful!

  13. sniderpac
    Posted 1 month ago #


    I have the exact same issue.

    I am seriously NOT tech savvy and need help.

    Would you be able to help me step by step to rectify this issue?


    Howard Snider


You must log in to post.

About this Topic