<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Interconnect IT - WordPress Consultants, Web Development and Web Design &#187; serialized php</title>
	<atom:link href="http://interconnectit.com/tag/serialized-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://interconnectit.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 17:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress (and others) Search and Replace Tool</title>
		<link>http://interconnectit.com/124/search-and-replace-for-wordpress-databases/</link>
		<comments>http://interconnectit.com/124/search-and-replace-for-wordpress-databases/#comments</comments>
		<pubDate>Wed, 18 May 2011 10:51:26 +0000</pubDate>
		<dc:creator>David Coveney</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[serialized php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://spectacu.la/?p=124</guid>
		<description><![CDATA[WordPress has a habit of storing serialized PHP data in the database. This is fine if you're working in PHP, but when you migrate a website from one domain to another it's very easy to affect strings and corrupt this data.  This search &#038; replace tool can help you to make changes without inadvertently affecting settings such as widgets which could leave you with a very broken and time consuming migration.]]></description>
			<content:encoded><![CDATA[<div id="attachment_2387" class="wp-caption alignright" style="width:320px;"><strong><a href="http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacev2.jpg"><img class="size-medium wp-image-2387" title="searchreplacev2" src="http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacev2-320x449.jpg" alt="" width="320" height="449" /></a></strong><p class="wp-caption-text">Version two brought a smarter UI and better workflow</p></div>
<p>When you&#8217;re migrating <a href="http://wordpress.org" title="WordPress">WordPress</a> (or any other platform using serialized PHP strings in the database) between domains, you must use a safe search and replace method that preserves the integrity of the serialized string lengths.  A simple of a dump file for http://localhost to, for example, http://thenewdomain.com is problematic because the length of the string changes but the indexes for the serialized strings does not.  Consequently settings are lost and widgets disappear.  Not good.</p>
<p>This script can now also handle multiply nested serializations, which can happen in transient values in WP at times, and it can also handle multi-byte Unicode changes safely.  This is important now that <a href="http://en.wikipedia.org/wiki/Internationalized_domain_name" title="Internationalised domain name">internationalised domain names</a> are allowed.</p>
<h3>It&#8217;s Not Only for WordPress</h3>
<p>It&#8217;s worth mentioning that the code will work for any platform that stores PHP serialized arrays in a MySQL database. You can easily use this script on Drupal, Joomla and many other systems where you need to change items across a database without messing up your stored arrays.</p>
<p><a class="call-to-action" href="http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacedb21.zip">Download Search Replace DB v 2.1.0</a></p>
<h3>Contribute!</h3>
<p>A lot of developers now use this plugin. If you feel you can add something, there is now an official Github repository for this script at <a href="https://github.com/interconnectit/Search-Replace-DB" title="PHP Safe DB Search-Replace">https://github.com/interconnectit/Search-Replace-DB</a> </p>
<h3>Version 2.1.0 (released Dec 2011) Improvements</h3>
<p>The latest version 2.1.0 introduced a number of key improvements:</p>
<ol>
<li>Added charset support, helping in all sorts of places (thanks Sergey Biryukov!)</li>
<li>Added option to skip guid column for migrating already live sites</li>
<li>Removed use of deprecated functions.</li>
<li>Other bug &amp; comment fixes</li>
</ol>
<h3>Changes being prepared for Version 2.2.0</h3>
<ol>
<li>Support for BLOBS/Objects to give Drupal compatibility</li>
<li>Minor tweaks and corrections</li>
</ol>
<p><a class="call-to-action" href="https://github.com/interconnectit/Search-Replace-DB">github Repo &#8211; DRUPAL devs please test master branch!</a></p>
<p>To see how you can use this tool to aid migrations, check out our <a href="http://www.interconnectit.com/719/migrating-a-wordpresswpmubuddypress-website/">article on WordPress migrations</a> or visit the <a href="http://wp.tutsplus.com/tutorials/hosting/migrating-wordpress-across-hosts-servers-and-urls/">WP Tuts+ article that mentions this script</a>.</p>
<p class="taxonomy">If you are in any doubt whatsoever about how to use this plugin, then please consider getting an expert in.  It&#8217;s a really powerful bit of code that if used badly can damage a WP install beyond repair.  If you want help, get in somebody like us, for example, or any of the other great guys listed over at <a href="http://codepoet.com/">CodePoet.</a></p>
<p><strong>IMPORTANT</strong>: This code is supplied with no warranty or support implied. You use it entirely at your own risk. Currently it is supplied under the WTFPL but this will change to the GPL eventually. And when you&#8217;ve finished using the script, PLEASE delete it as it can pose a serious security risk to your site.</p>
<p><a class="call-to-action" href="http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacedb21.zip">Download Search Replace DB v 2.1.0</a></p>
<h3>Changelog:</h3>
<p>// Version 2.1.0:<br />
// &#8211; Changed to version 2.1.0<br />
// * Following change by Sergey Biryukov &#8211; merged in and tested by Dave Coveney<br />
// &#8211; Added Charset Support (tested with UTF-8, not tested on other charsets)<br />
// * Following changes implemented by James Whitehead with thanks to all the commenters and feedback given!<br />
// &#8211; Removed PHP warnings if you go to step 3+ without DB details.<br />
// &#8211; Added options to skip changing the guid column. If there are other<br />
// columns that need excluding you can add them to the $exclude_cols global<br />
// array. May choose to add another option to the table select page to let<br />
// you add to this array from the front end.<br />
// &#8211; Minor tweak to label styling.<br />
// &#8211; Added comments to each of the functions.<br />
// &#8211; Removed a dead param from icit_srdb_replacer</p>
<p>// Version 2.0.0 &#8211; returned to using unserialize function to check if string is serialized or not<br />
// &#8211; marked is_serialized_string function as deprecated<br />
// &#8211; changed form order to improve usability and make use on multisites a bit less scary<br />
// &#8211; changed to version 2, as really should have done when the UI was introduced<br />
// &#8211; added a recursive array walker to deal with serialized strings being stored in serialized strings. Yes, really.<br />
// &#8211; changes by James R Whitehead (kudos for recursive walker) and David Coveney 2011-08-26</p>
<p>// Version 1.0.2 &#8211; typos corrected, button text tweak &#8211; <a href="http://interconnectit.com/author/david-coveney">David Coveney</a> / <a href="http://interconnectit.com/author/rob">Robert O&#8217;Rourke</a><br />
// Version 1.0.1 &#8211; styling and form added by <a href="http://interconnectit.com/author/james-whitehead">James R Whitehead</a><br />
// Version 1.0.0 &#8211; original version by <a href="http://interconnectit.com/author/david-coveney">David Coveney</a></p>
<h3>To Be Done</h3>
<p><del>Ensure UTF8 encoding is enforced (see comments).</del> Added in v2.1.0<br />
Self/deletion or security system to prevent accidental security risks.<br />
Release CLI version for use on non-WP sites, or for other purposes (already supports use on any MySQL DB.)<br />
Change to GPL V3.<br />
<del>Eliminate warnings and remove deprecated function calls.</del> Added in v2.1.0<br />
Add facility to subscribe to interconnect/it Newsletter.</p>
<p><a class="call-to-action" href="http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacedb21.zip">Download Search Replace DB v 2.1.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://interconnectit.com/124/search-and-replace-for-wordpress-databases/feed/</wfw:commentRss>
		<slash:comments>146</slash:comments>
		</item>
	</channel>
</rss>

