<?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>Pontus Östlund &#187; Netbeans</title>
	<atom:link href="http://www.poppa.se/blog/tag/netbeans/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.poppa.se/blog</link>
	<description>My blog about web development and such</description>
	<lastBuildDate>Mon, 16 Jan 2012 00:38:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Annoying Wordpress thing&#8230;</title>
		<link>http://www.poppa.se/blog/annoying-wordpress-thing/</link>
		<comments>http://www.poppa.se/blog/annoying-wordpress-thing/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 20:18:02 +0000</pubDate>
		<dc:creator>Pontus</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">/blog/?p=251</guid>
		<description><![CDATA[It seems Wordpress is hard coding the domain name into the database. How smart is that, or have I missed something? When I first set the site up on my local development server I soon noticed that various links were written hard with the domain and everything. Obviously that would f**k thing up once the [...]]]></description>
			<content:encoded><![CDATA[<p>It seems Wordpress is hard coding the domain name into the database. How smart is that, or have I missed something? When I first set the site up on my local development server I soon noticed that various links were written hard with the domain and everything. Obviously that would f**k thing up once the site was moved to the public server. So I went into the settings and saw that there were two fields &#8211; Wordpress address and Blog address &#8211; containing absolute paths. So I changed them to relative onces, e.g <code>/blog</code> instead of <code>http://strindberg.loc/blog</code> and things seemed to work properly.</p>
<p>Now I just realized that the <code>guid</code>s in the RSS feed pointed to my development server. I looked in the database table and saw that there were hard coded references to <code>http://strindberg.loc</code>. So with a little <code>UPDATE wp_posts SET guid = REPLACE(guid, 'strindberg.loc', 'www.poppa.se')</code> I thought I had solved the problem. But then I realized some other <code>guid</code>s in the RSS is generated on the fly, and they get f**ked up since the <code>Wordpress address</code> now is relative and thus some <code>guid</code>s looks like <code>http:///blog/some-url/</code>. Is that good or what?</p>
<p>And try to figure out how to find out where those <code>guid</code>s gets generated. My idea was to find where they are generated and there insert the <code>HOST</code> dynamically, but since there&#8217;s a zillion <code>apply_filter(...)</code> it&#8217;s virtually impossible to find where the shit gets generated (thanks to <a href="http://netbeans.org">Netbeans</a> it&#8217;s otherwise simple to follow the chain of execution. Just <code>ctrl+click</code> on a function call and the source of that function will be loaded.)</p>
<p>Ok, so now I have to put on my Sherlock hat and see if I can solve this. I find it hard to believe you shouldn&#8217;t be able to move a Wordpress site from one domain to another without having to work your ass off!</p>
<p>If anyone have a solution &#8211; it&#8217;s perfectly possible I&#8217;m missing out on something here &#8211; I&#8217;m happy to know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poppa.se/blog/annoying-wordpress-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

