<?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>shoogle designs&#039; blog &#187; Tag: database</title>
	<atom:link href="/blog/blog/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>https://shoogledesigns.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 11 Oct 2013 08:32:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Update a WordPress database table using Sequel Pro</title>
		<link>https://shoogledesigns.com/blog/blog/2013/06/12/update-a-wordpress-database-table-using-sequel-pro/</link>
		<comments>https://shoogledesigns.com/blog/blog/2013/06/12/update-a-wordpress-database-table-using-sequel-pro/#comments</comments>
		<pubDate>Wed, 12 Jun 2013 10:28:58 +0000</pubDate>
		<dc:creator>shoogledesigns</dc:creator>
				<category><![CDATA[app review]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Sequel Pro]]></category>

		<guid isPermaLink="false">https://shoogledesigns.com/blog/?p=1341</guid>
		<description><![CDATA[<p>I&#8217;m getting more and more requests from bloggers wanting to move from their blogging platforms to a private wordpress environment they will be able to manage as they wish, especially in terms of advertising. Anyway cut a long story short, as I was testing a database move from Canalblog (which is a french blogging platform) [&#8230;]</p><p>The post <a href="/blog/blog/2013/06/12/update-a-wordpress-database-table-using-sequel-pro/">Update a WordPress database table using Sequel Pro</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></description>
				<content:encoded><![CDATA[
<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> 
<p>I&#8217;m getting more and more requests from bloggers wanting to move from their blogging platforms to a private wordpress environment they will be able to manage as they wish, especially in terms of advertising.<br />
<span id="more-1341"></span><br />
Anyway cut a long story short, as I was testing a database move from Canalblog (which is a french blogging platform) to a local wordpress environment, thanks to an outdated plugin (still my best and only option), I ended up with an ok and usable database with a few things to be sorted by hand.</p>
<p>So what do you do when you don&#8217;t know shit about sql and want to mass correct data within your wordpress database tables?</p>
<h3>Sequel Pro</h3>
<p>First of all, and this is for mac users like me, you need to install <a href="http://www.sequelpro.com/" title="Sequel Pro" target="_blank">Sequel Pro</a>, an open source MySQL database administration tool which can do everything and more. It&#8217;s powerful, quick, user friendly (e.g. auto-completion), and it looks a tiny tad better than phpMyAdmin [lol].</p>
<p>Once in Sequel Pro, connect to your database using the MAMP config page, and rapidly browse your tables and various content.</p>
<p><img src="/blog/wp-content/uploads/2013/06/sequel-pro-setup.jpg" alt="Sequel Pro database setup" title="Sequel Pro database setup" width="795" height="226" class="alignnone size-full wp-image-1337" /></p>
<p>Right so back to my problem. All my posts had been imported with an extra string (&#8220;Commentaires sur&#8221;) in front of the post title and the post url.</p>
<p><img src="/blog/wp-content/uploads/2013/06/wordpress-database-import-gone-wrong.jpg" alt="Wordpress database import gone wrong" title="Wordpress database import gone wrong" width="1590" height="452" class="alignnone size-full wp-image-1340" /></p>
<p>In Sequel Pro, click on the Query button, and query your database:</p>
<pre class="brush: sql; title: ;">
SELECT post_title, post_name FROM wp_posts where post_title like 'Commentaires sur%'
</pre>
<p><img src="/blog/wp-content/uploads/2013/06/sequel-pro-query-select.jpg" alt="Sequel Pro Query select" title="Sequel Pro Query select" width="1590" height="452" class="alignnone size-full wp-image-1335" /></p>
<p>Test your modified data by adding the function of your choice within your query. Here, I just trim the character string by removing the first 18 characters: </p>
<pre class="brush: sql; title: ;">
SELECT SUBSTR(post_title, 18), SUBSTR(post_name, 18) FROM wp_posts where post_title like 'Commentaires sur%'
</pre>
<p><img src="/blog/wp-content/uploads/2013/06/sequel-pro-query-substring-select.jpg" alt="Sequel Pro Query substring select" title="Sequel Pro Query substring select" width="1590" height="452" class="alignnone size-full wp-image-1336" /></p>
<p>Once you&#8217;re happy with it, update your database (here I ran it in two blocks, one for post_title, then for post_name), and make sure you have no errors:</p>
<pre class="brush: sql; title: ;">
update wp_posts
SET post_title = SUBSTR(post_title, 18)
where post_name like 'commentaires-sur%'
</pre>
<p><img src="/blog/wp-content/uploads/2013/06/sequel-pro-update.jpg" alt="Sequel Pro database update" title="Sequel Pro database update" width="1590" height="206" class="alignnone size-full wp-image-1338" /></p>
<p>&#8230;and voilà, database is updated and your posts are working as expected.</p>
<p><img src="/blog/wp-content/uploads/2013/06/wordpress-database-import-gone-wrong-corrected.jpg" alt="Wordpress database import gone wrong corrected" title="Wordpress database import gone wrong corrected" width="1590" height="452" class="alignnone size-full wp-image-1339" /></p>
<p>Obviously, depending on the issue, you may need to use a different string function. You&#8217;ll find them all <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html" title="mysql string functions" target="_blank">here</a>.</p>
<p>The post <a href="/blog/blog/2013/06/12/update-a-wordpress-database-table-using-sequel-pro/">Update a WordPress database table using Sequel Pro</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>https://shoogledesigns.com/blog/blog/2013/06/12/update-a-wordpress-database-table-using-sequel-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taking WordPress database migration to another level</title>
		<link>https://shoogledesigns.com/blog/blog/2013/05/03/taking-wordpress-database-migration-to-another-level/</link>
		<comments>https://shoogledesigns.com/blog/blog/2013/05/03/taking-wordpress-database-migration-to-another-level/#comments</comments>
		<pubDate>Fri, 03 May 2013 10:17:32 +0000</pubDate>
		<dc:creator>shoogledesigns</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">https://shoogledesigns.com/blog/?p=1271</guid>
		<description><![CDATA[<p>We can all agree keeping our development WordPress database in sync with the production is pretty important and neat when it comes to WordPress theme development. And you might already know WP Migrate DB, the cool little plugin that exports your database as a MySQL data dump, does a find and replace on URLs and [&#8230;]</p><p>The post <a href="/blog/blog/2013/05/03/taking-wordpress-database-migration-to-another-level/">Taking WordPress database migration to another level</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></description>
				<content:encoded><![CDATA[
<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> 
<p>We can all agree keeping our development WordPress database in sync with the production is pretty important and neat when it comes to WordPress theme development. </p>
<p>And you might already know <a href="http://wordpress.org/extend/plugins/wp-migrate-db/" title="WP Migrate DB" target="_blank">WP Migrate DB</a>, the cool little plugin that exports your database as a MySQL data dump, does a find and replace on URLs and file paths, then allows you to save it to your computer.</p>
<p>Well, you will be delighted to hear that the guys at <a href="http://deliciousbrains.com/" title="Delicious Brains" target="_blank">Delicious Brains</a> are releasing <strong>Wp Migrate DB Pro</strong>, taking this wp database sync business to another level, and offering (in exchange of a one-time fee) features such as:</p>
<ul>
<li>Pull production/staging db down and replace local db</li>
<li>Push local db up and replace production/staging db</li>
<li>Select tables to export</li>
<li>Unlimited find &#038; replaces (currently you can only do 2)</li>
<li>Compatibility with multi-site</li>
<li>Priority email support</li>
</ul>
<p>Developer edition at $99 for use on unlimited sites looks right up my street if I&#8217;m honest with you.</p>
<div class="videoWrapper"><iframe width="560" height="315" src="http://www.youtube.com/embed/IFdHIpf6jjc" frameborder="0" allowfullscreen></iframe></div>
<p>The post <a href="/blog/blog/2013/05/03/taking-wordpress-database-migration-to-another-level/">Taking WordPress database migration to another level</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>https://shoogledesigns.com/blog/blog/2013/05/03/taking-wordpress-database-migration-to-another-level/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: shoogledesigns.com @ 2013-10-13 15:07:37 -->