<?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>Netflow Developments &#187; import</title>
	<atom:link href="http://blog.netflowdevelopments.com/tag/import/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.netflowdevelopments.com</link>
	<description>The latest and greatest happenings in the world of Science, Technology and everything else Geek</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Importing 1000&#8242;s of posts, publishing 1000&#8242;s of drafts and mysql fun</title>
		<link>http://blog.netflowdevelopments.com/2011/03/10/importing-1000s-of-posts-publishing-1000s-of-drafts-and-mysql-fun/</link>
		<comments>http://blog.netflowdevelopments.com/2011/03/10/importing-1000s-of-posts-publishing-1000s-of-drafts-and-mysql-fun/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 19:17:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bulk]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[draft]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[importer]]></category>
		<category><![CDATA[many]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[publish]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=623</guid>
		<description><![CDATA[Alright so for one of my side businesses I am using wordpress as a platform to create large directories for businesses to use to find other businesses.  It&#8217;s like a big ass yellow pages but for specific businesses.  Anyways part of the fun has been figuring out how to get 5000-6000 listings per city into [...]]]></description>
			<content:encoded><![CDATA[<p>Alright so for one of my side businesses I am using wordpress as a platform to create large directories for businesses to use to find other businesses.  It&#8217;s like a big ass yellow pages but for specific businesses.  Anyways part of the fun has been figuring out how to get 5000-6000 listings per city into a wordpress blog as painlessly as possible and it has been anything but painless figuring it out.  So through my blood sweat and tears I have learned a few things and figured I&#8217;d share 3 or 4 of them to make someone elses life a little less dreadful.</p>
<p>*<strong>PS: </strong>You need to be root on your server for this to work, if you aren&#8217;t don&#8217;t waste your time cause none of this will work*</p>
<p>*<strong>PPS:</strong> Read this article all the way through before doing anything or you&#8217;re going to spend time redoing shit*</p>
<h3>1.) Importing a shit-ton of posts</h3>
<p>So after you&#8217;ve put together the 1000&#8242;s of posts you need to get it into wordpress.  A decent tool for the job is CVS-importer [<a href="http://wordpress.org/extend/plugins/csv-importer/" target="_blank">Found HERE</a>].  I have it importing upwards of 6000 posts in under 5 minutes, but <strong>only</strong> after I&#8217;ve tweaked mysql some.  If you are running on a share server where you don&#8217;t have root access to mysql you&#8217;re going to have a hell of a time getting this to work with large numbers of posts.  Under default mysql configurations I&#8217;ve gotten it to import 400 posts in a go but anything over that and it started to peter out.  In section 3 I&#8217;ll go over some mysql tweaks.</p>
<p>Now the one <strong>key</strong> element to this working out is that you have to have CVS-Importer publish all of your posts as DRAFT.  Make bloody well sure that is checked or else the thing will croak on you.. For whatever reason I can import 2000 posts in 150 seconds as drafts but doing 500 as published posts hangs the system.  No clue why, but that&#8217;s the rub on that</p>
<h3>2.) Publishing 1000&#8242;s of draft posts at once</h3>
<p>So at first glance this looks to be a pretty f&#8217;ing daunting task.  You&#8217;ve got 5000 posts sitting as drafts and publishing them 10 or 20 at a time is giong to take forever.  Well it still will take a while but a hell of a lot less than you think.</p>
<p>Login to your box, go into mysql, use the wordpress database your are importing all these posts into and do the following</p>
<pre class="html">UPDATE wp_posts  SET post_status = 'publish' WHERE post_status != 'static';</pre>
<p>replace PUBLISH with with either draft, private, or publish and viola.</p>
<p>Alternatively if you want to just do this on a per author basis do the following from inside mysql:</p>
<pre class="php">UPDATE wp_posts SET post_status=<span class="phpString">'publish'</span> WHERE post_author=<span class="phpString">'<span style="color: #ff0000;">NUMBER</span>'</span><span class="phpText">;</span></pre>
<p>Again replacing PUBLISH and also replacing <span style="color: #ff0000;">NUMBER</span> with the ID # of whatever user you are importing these posts under.</p>
<p>Viola, 10000 posts published in less than 20 seconds <img src='http://blog.netflowdevelopments.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>*Alternatively this sort of thing can be done from phpMyadmin if you dont&#8217; want to go through shell, in which case I&#8217;d also recommend picking up some pampers at Wal-Mart right now as they are on sale :p *</p>
<p>A huge thanks to WPMU.org for the above tip, man that girl just saved me hours of work: <a href="http://wpmu.org/daily-tip-bulk-edit-of-the-status-field-for-all-posts-in-wordpress-database/" target="_blank">http://wpmu.org/daily-tip-bulk-edit-of-the-status-field-for-all-posts-in-wordpress-database/</a></p>
<h3>3.)Tweaking Mysql</h3>
<p>Something I figured out when first trying to import large numbers was that the default mysql install was not setup with this kind of thing in mind, so there&#8217;s a bit of tweaking you&#8217;re going to have to do to help it handle the amount of data coming in and I&#8217;m guessing also the way that this plugin imports things.</p>
<p>Mainly you need to increase key_buffer_size from 128 up to somewhere around 384M.  I didn&#8217;t test it with a ton of posts at 256M but it did work for a couple thousand.  The key here is to tweak it so it is using just enough memory to do what you want but not a drop more.  For me with big imports of 6000-7000 posts 384M did the trick, but there are a couple of new blogs coming up with 20,000 + posts in them so chances are I might have to temporarily increase it for those and then probably scale it back down once that is done.</p>
<p>I am running FreeBSD and for me I have to edit my /etc/my.cnf and add the following line:</p>
<p>[mysqld]<br />
key_buffer_size=384M</p>
<p>That should just about do it, was yet another big day of learning today so I thought I&#8217;d share a little bit as there isn&#8217;t a lot of resources out there for this sort of thing.. Also I&#8217;ll freely admit that wordpress probably isn&#8217;t the best platform to be doing this sort of thing on in general, if you can get away with a specific piece of software for directories you&#8217;d be better off.  Hell I imagine joomla or drupal would probably be more efficient but for how I am structuring everything wordpress was the name of the game.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 67px; width: 1px; height: 1px; overflow: hidden;">
<h1>414 Request-URI Too Large</h1>
<h1>414 Request-URI Too Large</h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2011/03/10/importing-1000s-of-posts-publishing-1000s-of-drafts-and-mysql-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching from Evolution to Thunderbird &#8211; importing the works</title>
		<link>http://blog.netflowdevelopments.com/2010/02/10/switching-from-evolution-to-thunderbird-importing-the-works/</link>
		<comments>http://blog.netflowdevelopments.com/2010/02/10/switching-from-evolution-to-thunderbird-importing-the-works/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 19:59:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[calander]]></category>
		<category><![CDATA[contacts]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[mozila]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[thunderbird]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=416</guid>
		<description><![CDATA[So today was the last straw with Evolution. It is just too buggy and too unstable of an email platform for me to use anymore so I began the dreaded migration of 1.1 GB of emails to a different client. Thanks to the awesome walkthrough below it turned out to be a lot less painful [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="thunderbird" src="http://blog.bounceweb.com/wp-content/uploads/2009/02/thunderbird.jpg" alt="" width="400" height="400" />So today was the last straw with Evolution.  It is just too buggy and too unstable of an email platform for me to use anymore so I began the dreaded migration of 1.1 GB of emails to a different client.  Thanks to the awesome walkthrough below it turned out to be a lot less painful than I had imagined.</p>
<p>If you are using Evolution and are getting fed up of the little bugs and instabilities here and there then check out the article below on how to switch to Thunderbird:</p>
<p><a href="http://maketecheasier.com/how-to-migrate-from-evolution-to-thunderbird-in-ubuntu-intrepid/2008/12/04" target="_blank">http://maketecheasier.com/how-to-migrate-from-evolution-to-thunderbird-in-ubuntu-intrepid/2008/12/04</a></p>
<p>A quick highlight :</p>
<h3>Migrate local mail from Evolution</h3>
<p>First, we will migrate the Evolution mails that are stored locally in your hard disk.</p>
<p>Open up two Nautilus windows (if you like, you can open two tabs instead of two windows). Press <em>Ctrl + H</em> to reveal the hidden folders. In one window, navigate to the <em>.mozilla-thunderbird</em> folder. You should see a folder with name similar to <em>i7bqvbzk.default</em>. Click on that folder, followed by <em>Mail</em> and <em>Local Folder</em>s. You should see some files like <em>Inbox</em>, <em>Trash</em>, <em>Unsent Message</em> etc.</p>
<p><img title="thunderbird-folder" src="http://images.maketecheasier.com/2008/12/thunderbird-folder.jpg" alt="thunderbird-folder" width="560" height="259" /></p>
<p>In the second window, navigate to <em>.evolution -&gt; mail -&gt; local</em> folder. Similarly, you will find files such as <em>Inbox</em>, <em>Outbox</em>, <em>Sent</em>, <em>Trash</em> etc.</p>
<p><img title="evolution-folder" src="http://images.maketecheasier.com/2008/12/evolution-folder.jpg" alt="evolution-folder" width="560" height="374" /></p>
<p>Now copy the five files <em>Inbox</em>, <em>Outbox</em>, <em>Drafts</em>, <em>Templates</em>, <em>Sent</em> from the Evolution folder to the Thunderbird folder. If it prompts you whether to replace the existing files, click <em>Replace All</em>.</p>
<p>If you have used any subfolders in your Evolution, you should see a folder with a <em>.sbd</em> extension (such as <em>#evolution.sbd</em>). In your Thunderbird folder, create a similar folder with the same name. Back to your Evolution folder, copy and paste all the files in the subfolder that don’t have a file extension to the Thunderbird subfolder.</p>
<p>That’s it. Restart your Thunderbird. You should see all your Evolution mails imported over.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2010/02/10/switching-from-evolution-to-thunderbird-importing-the-works/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

