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.
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.
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