• Wodrpess Multisite already makes life impossible for people trying to migrate sites/networks to a new URL. This is mostly due to the database being full of instances of the old URL everywhere.

    CCTM is adding to this problem in the cctm_data option of wp_x_options (x being a mulstisite blog id of course)

    To confirm this, with WP-CLI (on Linux) run:
    /path/to/wp-multisite$ wp --url=site.network.fake option get cctm_data | grep /
    (Or try the old domain instead of /)
    OR via SQL try
    SELECToption_value`
    FROM wp_x_options # change x
    WHERE option_name = “cctm_data”`

    You’ll see a list of values (almost 40 in my case!) such as url, datef, email, image, etc which have been hardcoded with the original (old) URL of the site. In fact, you can also find other values such as

    Since this is a json serialized set of options, I’m not sure there’s an easy way to replace all those values. Will try some things and report back. BTW, turning the plugin off and then on again doesn’t fix it.

    Regardless, it’s just very problematic that the plugin stores the URL, it should just form all those values dynamically when needed! At the very least it could double check those values each time the plugin is activated (including when it’s updated).

    https://www.ads-software.com/plugins/custom-content-type-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jorgeorpinel

    (@jorgeorpinel)

    wp --url=site.network.fake search-replace old.url.part new.url.part

    does the trick, also replacing values other tables though, such as guid which I somewhere read you should never ever touch. Site seems to work normally though…

    Please stop storing the URL in the options though!

    I was also able to ‘flush’ the file path cache by commenting out line 1272 of /includes/CCTM.php, refreshing the global settings page (was broken before this), then uncommenting the line to let the plugin begin using the newly cached path URLs.

    Ugly work-around for an unnecessary feature.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Super difficult to migrate sites due to cctm_data option’ is closed to new replies.