• Hi…

    i have a huge problem … i need to convert 2000+ pages into a custom post type
    with meta fields etc.. on a Live site..
    I try to switch 1 page to a post type .. this broke the whole subpages.. ( i did try it localy ofc )

    so here some examples…

    mypage.com/pets/ ( is the main page )
    mypage.com/pets/cats/ ( is one of the subpages ( section )
    mypage.com/pets/dogs/ ( is one of the subpages ( section )
    then i also have the A – Z subsection
    mypage.com/pets/cats/a/
    So for a full page with content the link looks like this
    mypage.com/pets/cats/a/Aegean ( Aegean is a breed of cat )

    since this is all on a Live site i cant just deleted all the content
    and start over… ??

    so i try to switch one page ( mypage.com/pets/cats/a/Aegean ) to a Posttype
    this broke everything until ( mypage.com/pets/cats/ )
    The pages are still in the database but the URLS are all go back on
    mypage.com/pets/ main page …

    What i need to do is make a Costum post type for those Cats and Dogs etc..
    under a subsection page ” PETS” without breaking my site..
    I can use ACF or Jetengine … to created the Posttype with Meta fields..

    but for example then i creat in Jetenige the Posttype PETS… it breaks the URL Pets.
    so all my pages after PETS are gone…

    Does anyone have a idea how to make this work without breaking the whole page ?

    • This topic was modified 4 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • try create a post type with a different name (“pets_cp”) so that it won’t break the URL while you are creating custom post type. Later you can change the post type name to “pets” after done.

    I would create a staging site to do the job so that it won’t affect the live site. Migrate from staging site to live site when done.

    Thread Starter fatjay

    (@fatjay)

    Hi… Thanks for the Idea…
    But my side is 400mb DATAbase and 30 GB space ( images etc )
    my hoster cant just make 2 sites running at the same time..
    also what about the content and comes new on the Live site ?
    i have comments,blogpost,podcast episode all relased in the mean time
    Since manual reworking 2000 pages gonna be something i gonna work for months on..
    Is there no soultion to slowly do 1 by 1 page to post ?

    I exported all posts and re-import them as custom post type using WP All Import/Export plugin. It is not a free plugin.

    There is an old plugin called Vice Versa which helps you switch from pages to posts and vice versa. There are probably others that are newer. But the problem you have is your URLs, which are very nested and totally about Pages and subPages.
    You need to convert your subPages to a taxonomy. You might need to have some redirects from the old structure to the new structure if you can’t find a way to define the post type or taxonomy rewrite structure like the Pages one is.

    Test your experiments on a local installation of your site, or use a sandbox like https://wpsandbox.net/
    You can export some nested pages without media and use that to test with. Be aware that you need to define the custom post type to be able to see it on your site. You can use a plugin like Custom Post Type UI to define the custom post type easily (including rewrites) and also the taxonomy.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Converter Pages to a Custom post type ? is this possible ?’ is closed to new replies.