<?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>Andy Fielder &#187; Bits</title>
	<atom:link href="http://andyfielder.com/category/bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://andyfielder.com</link>
	<description>Andy&#039;s Blog and Portfolio</description>
	<lastBuildDate>Wed, 26 Oct 2011 19:49:04 +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>How to find and replace SQL for wordpress</title>
		<link>http://andyfielder.com/2011/09/17/how-to-find-and-replace-sql-for-wordpress/</link>
		<comments>http://andyfielder.com/2011/09/17/how-to-find-and-replace-sql-for-wordpress/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 20:48:28 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Bits]]></category>

		<guid isPermaLink="false">http://andyfielder.com/?p=294</guid>
		<description><![CDATA[As you should know (if you have been keeping up to date with my blog/website) we have moved servers, while doing this i had to do a few bits and bobs. I will be posting these to my website over the next few days, as i get time to write something up for you all. [...]]]></description>
			<content:encoded><![CDATA[<p>As you should know (if you have been keeping up to date with my blog/website) we have moved servers, while doing this i had to do a few bits and bobs. I will be posting these to my website over the next few days, as i get time to write something up for you all. I thought this one was just a quick little nugget.</p>
<p>The SQL will let you find and replace text in your wordpress posts when executed on the database. I used this to change the domain details for the images used on the sites.</p>
<p>Here it is:</p>
<pre>UPDATE wp_posts SET post_content = REPLACE(post_content, 'andyfielder.com', 'andyfielder.co.uk');</pre>
<p>You use it in the form:</p>
<p>UPDATE your table SET &#8211; your field <em>and then</em> = REPLACE(your field <em>when you find</em> &#8216;SOMETHING&#8217;, <em>with</em> &#8216;SOMETHING ELSE&#8217;);</p>
<p>Hope you find it useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://andyfielder.com/2011/09/17/how-to-find-and-replace-sql-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Blogs Same Users</title>
		<link>http://andyfielder.com/2010/03/01/wordpress-blogs-same-users/</link>
		<comments>http://andyfielder.com/2010/03/01/wordpress-blogs-same-users/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 21:35:40 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.andyfielder.com/?p=144</guid>
		<description><![CDATA[Another guide i thought i would commit to my blog for the future. These code snippets allow you to had any number of wp blogs and use the wordpress users all from the same blog. To start with install the 1st blog as per the instructions. Make the table prefix something you will recognise eg [...]]]></description>
			<content:encoded><![CDATA[<p>Another guide i thought i would commit to my blog for the future. These code snippets allow you to had any number of wp blogs and use the wordpress users all from the same blog.</p>
<p>To start with install the 1st blog as per the instructions. Make the table prefix something you will recognise eg &#8220;wp_main_&#8221; as you will have to refer back to it.</p>
<p>Once your fist blog has been installed, install your 2nd wordpress blog in a different directory. Make the table prefix something differnt ot the main/1st blog you made. But in the same database. Once the setup is complete, download the wp_config file and edit it.</p>
<p>Add:</p>
<blockquote><p>define(&#8216;CUSTOM_USER_TABLE&#8217;, &#8216;&lt;-YOUR MAIN USERS TABLE eg:wp_users-&gt;&#8217;);<br />
define(&#8216;CUSTOM_USER_META_TABLE&#8217;, &#8216;&lt;-YOUR MAIN USERS TABLE eg:wp_usermeta-&gt;&#8217;);<br />
define(&#8216;CUSTOM_CAPABILITIES_PREFIX&#8217;, &lt;-YOUR MAIN USERS PREFIX eg:&#8217;wp_-&gt;&#8217;);</p></blockquote>
<p>This lets the second blog use the tables relating to the user from the main blog.</p>
<p>You also need to make the authentication keys the same. Copy these from the wp_config file of your main blog:</p>
<blockquote><p>define(&#8216;AUTH_KEY&#8217;, &#8216;&lt;-YOUR KEY-&gt;&#8217;);<br />
define(&#8216;SECURE_AUTH_KEY&#8217;, &#8216;&lt;-YOUR KEY-&gt;&#8217;);<br />
define(&#8216;LOGGED_IN_KEY&#8217;, &#8216;&lt;-YOUR KEY-&gt;&#8217;);</p></blockquote>
<p>Now we are done with the config file. Now you need to edit a file called capabilities.php, this is found in your /includes/ folder.</p>
<blockquote><p><strong>Find:</strong> $this-&gt;cap_key = $wpdb-&gt;prefix . &#8216;capabilities&#8217;;</p></blockquote>
<blockquote><p><strong>And Replace:</strong> //    $this-&gt;cap_key = $wpdb-&gt;prefix . &#8216;capabilities&#8217;; added custom below</p>
<p>if (defined (&#8216;CUSTOM_CAPABILITIES_PREFIX&#8217;)) {<br />
$this-&gt;cap_key = CUSTOM_CAPABILITIES_PREFIX . &#8216;capabilities&#8217;;<br />
}<br />
else {    $this-&gt;cap_key = $wpdb-&gt;prefix . &#8216;capabilities&#8217;;<br />
}</p>
<p>$this-&gt;caps = &amp;$this-&gt;{$this-&gt;cap_key};<br />
if ( ! is_array( $this-&gt;caps ) )<br />
$this-&gt;caps = array();<br />
$this-&gt;get_role_caps();<br />
}</p></blockquote>
<p>Save these files down and upload them to your server. All should now be working. This can be done with any number of additional blogs.</p>
<p>Please remember you will need to change the capabilities.php file each time you upgrade to add the new lines.</p>
<p>Bookmark this page for next time ou upgrade!</p>
]]></content:encoded>
			<wfw:commentRss>http://andyfielder.com/2010/03/01/wordpress-blogs-same-users/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVN on 1and1 Hosting</title>
		<link>http://andyfielder.com/2010/02/25/svn-on-1and1-hosting/</link>
		<comments>http://andyfielder.com/2010/02/25/svn-on-1and1-hosting/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 15:14:03 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.andyfielder.com/?p=136</guid>
		<description><![CDATA[Here is another of my guides for 1and1 users, i had issues finding a good guide when installing or adding SVN, subversion to my 1and1 shared hosting for the first time, to trial is use for updating wordpress on 1and1 automatically, but more of that another day. Sorry for no pictures, if you are a [...]]]></description>
			<content:encoded><![CDATA[<p>Here is another of my guides for 1and1 users, i had issues finding a good guide when installing or adding <strong>SVN</strong>, <strong>subversion</strong> to my <strong>1and1</strong> shared hosting for the first time, to trial is use for updating wordpress on 1and1 automatically, but more of that another day.</p>
<p>Sorry for no pictures, if you are a more visual person then i will try and get some screen shots etc to help you on your way with SVN and 1and1</p>
<p>Here is the executable code, it has taken me a few trials to get it all working as it should after studying the various guides on the net.</p>
<p>NOTE: You need to substitute YOUR_SERVER and the xx/xxxxxxx for your own details. These can be found by uploading a phpinfo() file to your host in the normal way and copying the details across.</p>
<p>NOTE:Check your subversion&#8217;s version i believe 1.6.3 is the latest, just change the version numbers and it should all work fine (if you want the latest version)</p>
<p>mkdir ~/tmp<br />
mkdir ~/opt/svn<br />
cd ~/tmp<br />
wget http://subversion.tigris.org/downloads/subversion-1.6.0.tar.gz<br />
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.0.tar.gz<br />
tar -xzvf subversion-1.6.0.tar.gz<br />
tar -xzvf subversion-deps-1.6.0.tar.gz<br />
cd ~/tmp/subversion-1.6.0<br />
./configure &#8211;prefix=/YOUR_SERVER/homepages/xx/xxxxxxxxxx/htdocs/opt/svn<br />
make<br />
make install</p>
<p>echo &#8216;export PATH=~/opt/svn/bin:$PATH&#8217; &gt;&gt; ~/.bash_profile<br />
svn &#8211;version</p>
<p>rm ~/tmp/subversion* -r<br />
svnadmin create ~/opt/svn/repos</p>
<p>There is the code needed to setup SVN using PuTTy and SSH to connect to the server</p>
<p><strong>Please let me know if i have made any errors.</strong></p>
<p><span style="text-decoration: underline">References:</span></p>
<p>http://www.flyonsoft.com/component/content/article/78</p>
<p>http://www.lbsharp.com/wordpress/index.php/2007/11/30/configuring-website-on-a-1and1-shared-host/</p>
<p>http://articles.itecsoftware.com/web-development/install-subversion-on-1and1-hosting-provider</p>
]]></content:encoded>
			<wfw:commentRss>http://andyfielder.com/2010/02/25/svn-on-1and1-hosting/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>1and1 Meet Magento</title>
		<link>http://andyfielder.com/2010/02/24/1and1-meet-magento/</link>
		<comments>http://andyfielder.com/2010/02/24/1and1-meet-magento/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 20:01:18 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.andyfielder.com/?p=116</guid>
		<description><![CDATA[A Guide to Installing Magento on 1and1 Shared Hosting. Hopefully you are aware that there limitations when using a sharedhosting provider, often implemented to allow the provider to keep the server secure. Luckily with 1and1 we are able to work around this and allow Magento access to PHP 5.2 (Please note this guide is just [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A Guide to Installing Magento on 1and1 Shared Hosting.</strong></p>
<p>Hopefully you are aware that there limitations when using a sharedhosting provider, often implemented to allow the provider to keep the server secure. Luckily with 1and1 we are able to work around this and allow Magento access to PHP 5.2 (Please note this guide is just for using with 1and1&#8242;s shared hosting solutions). Enjoy!</p>
<p><span style="text-decoration: underline">Getting Started</span></p>
<ul>
<li>Setup your MySQL database</li>
</ul>
<ol>
<li>Navigate to your 1and1 Administration tab in your 1and1 control panel</li>
<li>Using the 1and1 MySQL Administration page click New Database, start a fresh one just for Magento</li>
<li>Make sure its set to use MySQL version 5.0, fill in YOUR details as shown below</li>
</ol>
<p><a rel="attachment wp-att-117" href="http://andyfielder.com/2010/02/24/1and1-meet-magento/mysql-magento/"><img class="alignnone size-thumbnail wp-image-117" src="http://andyfielder.andyfielder.co.uk/files/2010/02/MySQL-Magento-270x150.jpg" alt="" width="270" height="150" /></a></p>
<ul>
<li>Download the latest Magento installation package (full release, not installer)-&gt; http://www.magentocommerce.com/download (at time of writing its version 1.4.0.1)</li>
<li>Upload this to your server (yes, upload the Magento zipped folder)</li>
<li>In your 1and1 control panel navigate to your web space explorer and right click on the .zip file you just uploaded and extract it. You are able to move/rename the folder if you need to.</li>
<li>Now you need to go back to your favourite FTP program and CHMOD the following files and folders to 777</li>
</ul>
<ol>
<li>magento/var/.htaccess (file)</li>
<li>magento/app/etc (folder)</li>
<li>magento/var (folder)</li>
<li>magento/media (folder)</li>
</ol>
<ul>
<li>Download the .htaccess file found in the root directory of your Magento install.</li>
<li>Edit the file, removing the comments from:</li>
</ul>
<blockquote><p>############################################<br />
## this line is specific for 1and1 hosting</p>
<p>AddType x-mapp-php5 .php<br />
AddHandler x-mapp-php5 .php</p>
<p>############################################</p></blockquote>
<ul>
<li>This allows you to use PHP 5.0</li>
<li>You will also need to un-comment &#8220;#RewriteBase /magento/&#8221; and edit it if you changed the location of your install</li>
<li>Re-upload the .htaccess file</li>
<li>Make sure the MySQL database is READY, this is shown in the 1and1 control panel under MySQL Administration</li>
<li>Now you can begin the install goto http://www.you_domain.com/magento/index.php/install</li>
<li>From here you just need to add the details requested by the installation program, copying and pasting from the 1and1 control panel as needed</li>
<li>To enter the adming section of magento just point your browser to http://www.you_domain.com/magento/index.php/admin (or whatever you alter admin to in the installation)</li>
</ul>
<p>I hope you have found this 1and1 Magento setup guide useful, its been put together by myself after having issues setting up Magento on my shared 1and1 account. Info has been taken from a number of installation guides from the net and reworded by myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://andyfielder.com/2010/02/24/1and1-meet-magento/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>New Bits Section</title>
		<link>http://andyfielder.com/2010/02/24/bits-section/</link>
		<comments>http://andyfielder.com/2010/02/24/bits-section/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 18:49:06 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.andyfielder.com/?p=107</guid>
		<description><![CDATA[I&#8217;m going to be writing new posts in the bits section, which are there for reference, of things that i hope people will find interesting to read and a help. If you like to read things like this, rather than knowing absolutley everything about what im geting upto on the net, subscribe to the Bits [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be writing new posts in the bits section, which are there for reference, of things that i hope people will find interesting to read and a help.</p>
<p>If you like to read things like this, rather than knowing absolutley everything about what im geting upto on the net, subscribe to the Bits category.</p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://andyfielder.com/2010/02/24/bits-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

