<?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>Fri, 27 Apr 2012 16:43:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</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 title="WordPress" href="http://wordpress.org">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 title="Internationalised domain name" href="http://en.wikipedia.org/wiki/Internationalized_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>Installation &amp; Use</h3>
<p>To use the script, you should install it in the root folder of your WordPress  install (if you wish it to automatically pick up your wp-config) or anywhere else you fancy, but you won&#8217;t get the automatic config.  You should also, to protect yourself from automated scanners looking for this script, rename it first.  eg, you could name it as rrrrreplace.php &#8211; you&#8217;d then visit a url like http://example.com/rrrrreplace.php and follow the on-screen instructions from there.</p>
<p>What you absolutely, 100% certainly MUST do is to delete the script once you&#8217;ve finished.  If somebody chances on it they can do anything to your database &#8211; and that wouldn&#8217;t be nice, would it?</p>
<p>If you&#8217;re using the script with systems such as Drupal or Joomla, everything should work, but we haven&#8217;t added any code to pick up on your config.  You may also have issues with Drupal blobs, in which case you should head on over to GIT (see link below) to grab the development copy which has handling for this included &#8211; feedback would be helpful, thank you.</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 title="PHP Safe DB Search-Replace" href="https://github.com/interconnectit/Search-Replace-DB">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 standalone script, 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>
<h3>Donations</h3>
<p>We&#8217;ve been asked a lot in the comments box below about accepting donations. But you can&#8217;t believe what a headache that is from an accounting and tax perspective.</p>
<p>Consequently all we can say is that if you wish to you can buy a personal gift for the key developers from one of the wishlists below &#8211; especially given that it&#8217;s a spare time project. If others who have contributed wish to provide us their wishlist links then we&#8217;d be more than happy to add them.</p>
<p><a title="David Coveney's Amazon Wishlist" href="http://www.amazon.co.uk/registry/wishlist/1I2TQ9F0U0MG0">David Coveney is the project lead.</a><br />
<a title="James Whitehead's Wishlist" href="http://www.amazon.co.uk/registry/wishlist/1CWUCTVKCZSFP">James Whitehead added the nice UI.</a><br />
<a title="Robert O'Rourke's Wishlist" href="http://www.amazon.co.uk/registry/wishlist/1EWBGC8Z5LCYF">Robert O’Rourke gave us the branding and has made tweaks.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://interconnectit.com/124/search-and-replace-for-wordpress-databases/feed/</wfw:commentRss>
		<slash:comments>266</slash:comments>
		</item>
	</channel>
</rss>

