WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP update: custom post_types GONE (7 posts)

  1. ixwa
    Member
    Posted 3 years ago #

    What in the world.

    Half my site is missing because of this. Am I supposed to do a manual update when a new WP version comes out?

  2. ixwa
    Member
    Posted 3 years ago #

    Follow-up: I manually re-added the custom post types I had registered under wp-content > wp-includes > post.php and everything seems to be working (although who knows what other custom code has been overwritten?).

    It's helpful that WP "warns" us to first back up the database, but it might also be helpful to warn the customizers among us to ALSO back up all PHP files that have been altered.

    Maybe I missed this in all the tomes of WP info but it would seem that if we're directed to register post types (and many, many other things) in WP core files like post.php, shouldn't WP warn us that an update will overwrite this?

    Ouch.

  3. kmessinger
    Volunteer Moderator
    Posted 3 years ago #

    All the directions I have seen are do not change core files and just for the reason above. I have always been told to use function.php.

    Where are you directed or told to modify core files?

  4. WebTechGlobal
    Member
    Posted 3 years ago #

    All you need to backup is your database. Any issues on upgrading allows you to then use the older version of WordPress until you sort any complications out.

    However if you make changes to the WordPress core files (that does not include anything in wp-content) then you would need to back the core installation up for the sake of applying the changes to the new version of WordPress. But that is something you or your webmaster or hired developer should take care of. If you hired someone to work on WordPress check on any changes to the core files and find out of there is a backup.

    If this is not the case. Then I would not worry. As long as you have your database backed up and start troubleshooting you will restore your site eventually.

    Try automatic upgrade. Good luck.

  5. ixwa
    Member
    Posted 3 years ago #

    On this page: http://codex.wordpress.org/Function_Reference/register_post_type

    A the bottom it says source file: "register_post_type() is located in wp-includes/post.php."

    Am I misreading this? Is one supposed to register new post types elsewhere? functions.php?

  6. keesiemeijer
    moderator
    Posted 3 years ago #

    Yes, In your theme's functions.php

  7. ixwa
    Member
    Posted 3 years ago #

    Ah, I didn't realize that *all* user-customized PHP went into functions.

    Thanks all.

Topic Closed

This topic has been closed to new replies.

About this Topic