Error: Post type names must be between 1 and 20 characters in length

Hi – I recently enabled debugging mode for my wordpress multisite and when I go to my home page I get this error “register_post_type was called incorrectly. Post type names must be between 1 and 20 characters in length”.

What does this mean and how can I fix it? Thanks!

  • Adam Czajczyk
    • Support Gorilla

    Hello Tyler,

    I hope you’re well today and thank you for your question!

    It looks like there’s some code added to your site that’s attempting to register a custom post type. The “register_post_type()” function is a WP core function that’s used for this but the names of custom post types shouldn’t be empty and shouldn’t be longer than 20 characters.

    However, it’s difficult to guess where did this error came from. Have you added any kind of custom code to the site that would try to register custom post type? Are there any plugins that create additional post types?

    Would you mind if I took a look at your site setup? I could do this by accessing it via a “support access” feature of our “WPMU DEV Dashboard” plugin. To grant me a support access please follow this guide:

    Let me know here please after you grant an access and I’ll be happy to investigate the issue.

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.