Home>Support>Moving site to a new Url – keeping the old database

Moving site to a new Url – keeping the old database

Hi

I’ve just moved my site to a new URL but kept the same underlying MySQL database. The problem I have is that although the words appear on the pages the PageBuilder functions aren’t appearing (e.g no formatting, carousel, etc). When I go to edit a page I can’t see any data at all.

I’ve replaced all instances of the old URL in the database tables this is specific to the way PageBuilder works.

I’ve read about deserialising the content (https://siteorigin.com/thread/migration-from-local-to-server/), but and not 100% confident in the code (specifically the smart quotes).

Can you help?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 10 months ago [email protected]

    ** UPDATE **
    I’ve managed to get the content to show correctly. BUT I can’t amend the content as it still doesn’t show in the page edit screens.

    To get this far; I took the other post’s and at line 324 of wp-includes/functions.php (at least, that’s where it is in 4.6.1) add the line so that it now reads:

    /**
     * Unserialize value only if it was serialized.
     *
     * @since 2.0.0
     *
     * @param string $original Maybe unserialized original, if is needed.
     * @return mixed Unserialized data can be any type.
     */
    function maybe_unserialize( $original ) {
    	if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in
    	{
    		$original = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $original);
    		return @unserialize( $original );
    	}
    	return $original;
    }
    

    If anyone can help me with the final hurdle of editing the content I’d be really grateful!!

    Thanks

  2. 7 years, 10 months ago Alex S
    Hi, I Work Here

    Hi Nathan,

    I personally cannot recommend running the code linked in that thread.

    I would instead recommend reverting the changes you’ve made to the post data (specifically the wp_postmeta field titled panels_data). Then I would run a plugin like Better Search and Replace (which support serialized data replacement) and then replace the old URL with the new URL.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More