WordPress migration, CCTM and basepath error

I migrated my site over and not get a problem

Warning: require_once(): open_basedir restriction in effect. File(/home/httpd/mytestserver.co.uk/mysite/httpdocs/wp-content/plugins/custom-content-type-manager/fields/text.php) is not within the allowed path(s):

Read More

The path it is looking for is on the dev server. How can I find and change this?

Related posts

Leave a Reply

1 comment

  1. For anyone who will have this problem, replace the paths, put it in your themes functions.php and refresh browser:

    $cctm = get_option('cctm_data');
    foreach( $cctm["cache"]["helper_classes"]["fields"] as $key=>$f ) {
      $cctm["cache"]["helper_classes"]["fields"][$key] = str_replace("OLD BASE PATH","NEW BASE PATH",$f);
    }
    foreach( $cctm["cache"]["helper_classes"]["filters"] as $key=>$f ) {
      $cctm["cache"]["helper_classes"]["filters"][$key] = str_replace("OLD BASE PATH","NEW BASE PATH",$f);
    }
    update_option( "cctm_data", $cctm );
    

    Credit goes to https://gist.github.com/shoreline-chrism/1a8de1588ed67247ab03#file-wp-cctm-path-fix-php