• Resolved bauralex

    (@bauralex)


    Hi
    I’m using the pro version of your plugin for a client. My wordpress installation was in a subfolder on the server and now we changed the server and put it on root level. The problem is, that your plugin writes the static links to the image inside the database and I can’t change it.

    Since you serialize your array and base64_encode it, I tried to base64_decode it, str_replace the parts of the domain which I don’t need anymore then base64_encode it and update the post meta fields… Unfortunately the plugin doesn’t accept the base64 code and I get a foreach error

    Do you have a simple fix to change the static links inside the datbase? I have a lot of sliders and a lot of images inside them therefore I’m looking for a faster solution then create every slider again.
    Thanks

    Thats my little script to change the meta fields of every gallery

    $args = array(
    	'post_type' => 'risp_gallery',
    	'posts_per_page' => -1
    );
    $posts = get_posts($args);
    
    foreach($posts as $post) :
    	$risp_gallery_meta = get_post_meta($post->ID,'risp_all_photos_details');
    	$risp_gallery_meta = unserialize(base64_decode($risp_gallery_meta[0]));
    	$risp_gallery_meta = str_replace('xxx.ch/wordpress','xxx.ch',$risp_gallery_meta);
    	$risp_gallery_meta = base64_encode($risp_gallery_meta);
    	update_post_meta($post->ID,'risp_all_photos_details',$risp_gallery_meta);	
    endforeach;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Serverchange -> Image not found’ is closed to new replies.