Support » Plugin: Custom Content Type Manager » Problem after moving server

  • Resolved dgunwin

    (@dgunwin)


    After moving my WordPress site to a new server CCTM stopped working.

    I did some research, and found out that I should have exported the CCTM settings from the old server, and then imported them to the new server. Like this (bottom of page):

    https://code.google.com/p/wordpress-custom-content-type-manager/wiki/FAQ#My_Custom_Fields_Broke_after_Moving_my_Site

    But, I didn’t do this, and by the time I found out there was a problem, the old server had been turned off. So I couldn’t go back and do the transfer again.

    Has this happened to anyone else?

    Please can you tell me what is the best option to get my site working again?

    Is there a standard procedure I can follow?

    I am comfortable working with php, mysql, etc. So even if the solution is technical, that is fine for me. I have not used this plugin before, so I just want to know the best way to get it working again in this situation.

    Thanks a lot for your help.

    https://wordpress.org/plugins/custom-content-type-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    It’s tough – WP is really not built with moving in mind, unfortunately.

    The good news is that your posts and values are there if you ported the database correctly. The bad news is that your definitions are toasted. There is a tool (under CCTM -> Tools) menu that will help you detect existing post types and custom fields. You can use that to help rebuild your config file. You’ll have to polish the custom field definitions (e.g. default values or options in a dropdown etc), but it can save you a lot of time.

    Hope that helps.

    Hello. Thanks a lot for you quick response. It is much appreciated.

    Yes, I still have all of the posts and the actual site is still working. It is just I can’t edit custom posts in the WP dashboard…

    When you say ‘config’ file, which file do you mean? Could you give a few pointers to get me started on rebuilding this config file?

    Thanks again for your help.

    Plugin Contributor fireproofsocks

    (@fireproofsocks)

    By “config” I mean your post-type definitions (i.e. the CCTM configuration). That’s what got toasted when you migrated servers (due to WP’s bad architecture).

    This isn’t polished or documented yet, but here’s what you can do:

    1. Re-recreate your post-types. You can look at the CCTM–>Info tab (/wp-admin/admin.php?page=cctm&a=info) to see a list of the post-types that were detected in your database and use that as a “shopping” list. E.g. you’ll see the standard post and page, but you should also see your custom ones, e.g. “myposttype” etc). Jot these down and then head to the CCTM-> Content Types -> Create Content Type page and recreate the custom post-types one by one. The most important thing is the “post_type” field: that’s what uniquely identifies the posts in the database. The other settings control aesthetics and behavior.

    Once you’ve re-defined your post types, you’ll have menus and basic functionality back.

    2. Re-create your custom fields. Go to CCTM –> Custom Fields –> Bulk Add fields. This is a helper utility that detects fields used by a given post or post type. E.g. choose one of your newly re-defined post types and then click “Lookup Fields”. As long as some data is in the database for this post-type, the CCTM can find the name of the field. It takes a guess as the label and then you can select the type of field (it defaults to a text field).

    You can repeat step 2 for each post-type you’ve got and by the end you should have all your fields back. This isn’t a perfect recovery mechanism: meta data (such as search criteria or field types or custom labels etc) all has to be re-created. That’s the stuff that got lost when your config was nuked.

    Thank you so much for taking the time to write this detailed answer. I’ve now attempted to implement it.

    I just wanted to write down below what my experience was, in case it helps any one else out in the future.

    When I got to step 1 of your process I could actually see that my Custom Post Types were still being recognised by WordPress – I could see this because they were still displaying in the left hand menu of the dashboard. So there was no need to re-create them. (In fact when I tried to create a custom post with the same name, I got an error message saying it already existed).

    My problem was that when I tried to edit the content of a custom post, I would get a blank screen.

    So I moved on to step 2 of your process, to see if this would make a difference. However, when I went to Custom Fields tab, I got an error page saying ‘You do not have sufficient permissions to access this page.’ (I tried logging in as two different users as admin, and still got this problem)

    A CCTM upgrade was available (Version 0.9.7.13). So I backed up the whole site, hoping that this upgrade might do something. Luckily for me, after I installed the upgrade everything started working! It is as if the update effectively re-booted the plugin.

    I still get the ‘You do not have sufficient permissions to access this page’ message when I go to the Custom Fields tab. But we can live with this for the time being! Just glad to have the system working properly now.

    Thanks again for your help. It really meant I lot to have your guidance and knowing that someone was there to help out. I’ll certainly give a donation for your time.

    Plugin Contributor fireproofsocks

    (@fireproofsocks)

    Glad you got things (mostly) working. If you saw the custom post types, then it’s clear that the definitions were being loaded (and that they probably had not been deleted). Re the vague WP permissions errors, it’s one of those times when it’s maddening that WP has no logging with detailed information.

    Maybe you could also try clearing the CCTM’s cache (it’s under the main CCTM menu).

    Make sure you backup your cctm definitions under the tools menu! That definition file is critical to making your site work, and WP’s architecture is particularly fragile when it comes to moving servers.

    I’m at a loss as to what else might be causing the errors you’re seeing, but it is almost certainly something to do with the migration. Sometimes a full removal and then a full re-install helps massage these things out, but make sure you have a full backup first.

    deleting the cache worked to me. thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem after moving server’ is closed to new replies.