Home › Forums › Technical Support › Help needed: Migrating from Blogger to WordPress
- This topic has 2 replies, 3 voices, and was last updated 15 years, 5 months ago by Rahul Bansal.
-
AuthorPosts
-
May 3, 2009 at 10:03 am #45436peterbergsonParticipant
Hi there. Here are the details of what I have, have done, and would like to do (though I’m not sure what I’m doing):
-I have a registered domain that I’m currently using w/ blogger and would like to continue using with WordPress
-I have set up a “test” wordpress blog which is hosted on Godaddy
-I’d like to eventually make the “test” into the new blog and make the proper DNS changes so that my main domain is directed to it. Godaddy told me this is possible. I just want to make sure.
-I would like all my permalinks to stay the same, or at least lead to the proper place.
I’m confused about which of your posts apply to me, though I’ve read your tutorials. Anything you can do to help make this as simple and as painless as possible would be appreciated.
May 28, 2009 at 2:30 am #45437Ankit PuriParticipantPeter
You can use wordpress import feature to import all your blogspot posts to wordpress then all you need to do is set 301 perma redirection and change your permalinks to match with blogspot.The permalink structure will be like this /%year%/%monthnum%/%postname%.html
This are the codes you need to add on your blogspot blog template for 301 perma redirection
after <blogger> add
<MainOrArchivePage>
<script language=”javascript”><!–
var blog_root=http://www.shoutmeloud.com/;
document.location.href=blog_root;
//–></script>
</MainOrArchivePage><ItemPage>
<script language=”javascript”><!–
var process_page=”http://www.shoutmeloud.com/bloggerposts.php”;
var newpage=process_page;
var oldlink=”<$BlogItemPermalinkUrl$>”;newpage+=”?p=”+oldlink;
newpage=newpage.toLowerCase();
document.location.href=newpage;
//–></script>
</ItemPage>and after <head> add
<meta http-equiv=”refresh” content=”0;url=http://www.yourdomain.com/” />
Now create a bloggerposts.php on the root of your wordpress directory and add this code it, replace yourdomain with your blog name
<?php
require($_SERVER[‘DOCUMENT_ROOT’].’/wp-blog-header.php’);
$search_link = $_GET[‘p’];
$vars = explode(‘/’, $search_link);
$num = count($vars) – 1;
$filename = $vars[$num];
$slug = str_replace(“.html”, “”, $filename);$SQL = “SELECT posts.* FROM $wpdb->posts AS posts WHERE posts.post_name = ‘$slug’ LIMIT 1”;
$posts = $wpdb->get_results(“$SQL”);if ($posts) {
foreach ($posts as $post) {
$found_link = get_permalink($post->ID);
}
}
else
{
$found_link = “http://www.shoutmeloud.com/”;
}?>
<html>
<head>
<title>Redirecting…</title>
<script language=”javascript”><!–
document.location.href=”<?php echo ($found_link); ?>”;
//–></script><meta http-equiv=”refresh” content=”2;url=<?php echo ($found_link); ?>”>
</head>
<body>
<h1>Redirecting…</h1>
<p>You can also proceed immediately to “><?php echo ($found_link); ?>.</p>
<p>The main blog URL is http://www.yourdomain.com/.</p>
</body>
</html>I hope this will help you.
June 5, 2009 at 12:49 am #45438Rahul BansalKeymaster@Peter
I am sorry for late reply buddy.This post is for you – http://www.devilsworkshop.org/moving-from-blogger-to-wordpress-maintaining-permalinks-traffic-seo/
You need to follow from step 2.
-
AuthorPosts
- You must be logged in to reply to this topic.