Support » Plugin: Custom Content Type Manager » [Plugin: Custom Content Type Manager] Cannot import cctm.json – file might be too large

  • Hello,

    I have been struggling to import a cctm.json file from my online website into a localhost wordpress installation. My goal is to set up a safe environment to test out some more advanced uses of your plugin with taxonomy plugins… but it seems I’m unable to import the cctm file.

    Unwilling to brush off your plugin as rubbish I found that the problem only lies with my online website’s cctm.json back up. I have a lot of custom fields and have created a business directory from it so the file size is 22.4kb. I isolated the issue to the file size, or something to do with the exports from the website, by successfully importing a 443 byte file from another blank wordpress installation with a single CCTM custom field as a test.

    My worry at this point is that should, for some unforeseeable reason, my website become corrupted I would be unable to restore it automatically using the import feature.

    Is this an issue anyone has encountered before? I haven’t asked a more specific question because at this point I’m not sure if CCTM is able to handle larger files or if I might have too many custom fields. Any ideas on how to resolve this?

    Best regards,

    Note: I have the most recent versions of CCTM, WordPress and PHP5 on a Dreamhost account and a localhost testing environment powered by MAMP.

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


    Hmm…. sounds interesting. I remember I had to code something in there to regulate file size that may be affecting you in this case. Try looking at the plugin’s includes/CCTM.php file and edit the setting for max_def_file_size at the top of the class:

    // used to control the uploading of the .cctm.json files
    	const max_def_file_size = 524288; // in bytes

    Maybe you can make this work simply by increasing that value on both dev and prod environments and try the process again. If that doesn’t work, I would try dumping the entire database and importing it locally — WP requires some fixes to paths and URLs in the database, but this is a fairly common operation.

    Please note that the CCTM .json definition files are NOT a backup of your content: it only provides a way to store the CCTM settings and definitions.

    Plugin Contributor fireproofsocks


    Could this be a problem with permissions? 524288 is about half a meg… so I don’t think that’s an issue. If your .json file doesn’t have the right permissions, then this could cause problems.

    If you don’t want to transfer your entire database, you only really need 2 options from the wp_options table — they both store serialized data. The options are named:

    • custom_content_types_mgr_data
    • custom_content_types_mgr_settings

    If you have phpMyAdmin or something, you can simply copy and paste the serialized text between your two installs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Content Type Manager] Cannot import cctm.json – file might be too large’ is closed to new replies.