How to transfer your blog from blogger or blogspot to WordPress
Posted by David WhitehouseSometime in 2008 I started a blog called Inventive Millionaire had over 120 posts on this blog and it was very similar to make money online kind of blog. Anyway I have decided to resurrect it because I now wish to make money from blogging and in order to do so I am going to need a lot of content and a lot of blogs.
So in order to resurrect the content I had to remove a redirect from Inventive Millionaire to David Whitehouse and then I had to export the content from Blogspot and run it through a conversion process to get it ready for WordPress, then I simply imported it into WordPress.
There is a simpler way but it didn’t work for me simply go to tools imports and select blogger from there and its pretty straightforward from then on.
htaccess redirects with regular expressions
Posted by David WhitehouseThe Problem
Ok so I hit a bit of a snag tonight, I had ended up with the following predicament.
I had a url: http://www.david-whitehouse.org/blog/ which I wanted to redirect to http://www.david-whitehouse.org/ but when I used the following code:
redirect 301 /blog/ http://www.david-whitehouse.org/
I ended up redirecting pages such as http://www.david-whitehouse.org/blog/blogging-voice-recognition/ to http://www.david-whitehouse.org/blogging-voice-recognition/ – but I wanted to keep it where it was (plus this created a redirect loop, which I could have fixed).
Twitter Friends to the Rescue!
So I asked for help on Twitter – offering a free link for the right answer (at first a site wide, then I chickened out and said “just a post”). Thankfully I found the answer – so they can all settle for a nice link in this post (see below).
Many things were suggested, some would have worked but I felt they were workarounds and I wanted to solve this particular issue in this way. I had tried some regular expressions, others passed me some more and people were passing me mod_rewrite code too. Unfortunately none of it seemed to work, some gave 500 errors, where as others resulted in the page sitting their, not moving – laughing at me, mocking at me, whispering…
Anyways!
The Solution
RedirectMatch 301 ^/blog/$ http://www.david-whitehouse.org/
redirect doesn’t let you use regular expressions – RedirectMatch does (perhaps this is common knowledge, but I couldn’t find it anywhere and it wasn’t in the code anyone gave me). I found the fix here.
Thanks guys
For those that participated in helping me, I would like to thank (in no particular order):
Malcolm Coles
David Elstob
Will Critchlow
David Cumbor
Teifion Jordan
Jaamit Durrani
How to fix _weak_escape() error after upgrading to Wordpress 2.8
Posted by David WhitehouseI just got the Wordpress error: Call to undefined function: _weak_escape() when trying to login to Wordpress admin after upgrading to Wordpress 2.8.
I looked it up and someone mentioned it was a problem to do with the redirection plugin – but to hell with disabling that, I love that plugin!!! So instead I looked into the file causing the problem:
wp-includes/wp-db.php
At a further look it didn’t seem to like the function _weak_escape, so I simply found what this function did, all it does is addslashes, so I embedded this into the code which was calling _weak_escape and hey presto! It works!
Here is the full code I used:
function escape($data) {
if ( is_array($data) ) {
foreach ( (array) $data as $k => $v ) {
if ( is_array($v) )
$data[$k] = $this->escape( $v );
else
$data[$k] = addslashes($v);
}
} else {
$data = addslashes($data);
}
return $data;
}
Hope that helps some of you out there!
I realise this isn’t the best fix for it – ideally you want to get it so it doesn’t believe _weak_escape is an undefined function – but I’m not sure what the cause of this is, I imagine I could try removing the underscore or searching at php.net – but it’s late and I want to go to bed! If you find the solution please let me know in the comments and I’ll give you a link
Blog Setup
Posted by David WhitehouseI’ve finished setting up Wordpress after following the guide on Yoast. Well worth going through by the way, I highly recommend it.
Now I’ve just got to get myself a new theme, as this one is messing up in FireFox it appears – not good. Anyone know where I can get a good theme?
Also need to remove the blog roll and start putting a post about each friend instead (sorry guys).
Wordpress almost setup for SEO
Posted by David WhitehouseJust been going through the Yoast Wordpress SEO guide
I’m about halfway through, it’s only taken me an hour! Well worth it I reckon.
Apologies to my friends, but I will be removing my blogroll and putting a post about each of you instead – hope you don’t mind!
How to setup Twitter to promote your Wordpress blog
Posted by David WhitehouseI’ve been looking into all the difference Twitter related plugins for Wordpress, all the different services starting up for Twitter and thinking about how you can promote yourself through Twitter. As a result of this I’ve come up with what I think is the perfect setup for promoting your Wordpress blog through Twitter. Basically, here is my setup:
1. I use Tweetmeme (the little icon top right of this post) to try and encourage to re-tweet my blog post.
2. I have TwitterUpdater, so that when I write a post and publish straight away, it announces it on my twitter feed.
3. When I do scheduled posts, TwitterUpdater won’t notify twitter, in order to do this you need to use TweetLater – which can also allow you to follow people who follow you, automatically.
4. I am using Twollow to follow other people, based on keywords.
5. I am also using TweetLater to keep an eye on keywords on Twitter, such as my name, domain name etc.
And that’s how you can maximise the amount of traffic you get from Twitter. If you have any more suggestions, please let me know. (P.S. This is a scheduled post – so it’s also a kind of a test to see if TweetLater and my Wordpress plugin can get it right. It might go horrible wrong because my Wordpress is an hour behind!)