If you ever have cause to move a WordPress blog from one domain to another you will want visitors to any pages on the old site to be silently redirected to the corresponding page on the new site. This goes particularly for Googlebot and other search engine spiders: you want them to be able to find your new site and update their databases so you don’t lose your ranking.
Moving Your Blog is a simple WordPress plugin that redirects all your posts and pages (status 301, permanently moved). The Admin pages are exempt so you can still administer the old blog.
Instructions
- First setup your new blog in its new domain so that every post and page in the old site has its copy in the new site.
- Download the latest version of Moving Your Blog.
- Unzip and copy moving.php to the wp-content/plugins folder of your old blog.
- Activate the plugin from the Admin Plugins page.
- Visit the Admin Options|Moving page and enter the address of your new blog. When you update the address the plugin becomes active and starts to redirect your posts and pages.
- To turn off redirection delete the address of your new blog.
- If you need to uninstall the plugin it can be deactivated from the Admin Plugins page and/or deleted from your wp-content/plugins folder.
Version
This is version 1.0 of Moving Your Blog. It is my first WordPress plugin.
Given the nature of this plugin it is hard to test so, for now, consider it beta software. If you try it let me know how it goes. The usual disclaimers apply.
This is the exact situation I have been trying to deal with. When I launched gotfoo.org I thought it would be cool to have sub-domains just like slashdot.org. But now after 6 months I am finding that it’s a real pain trying to manage 2 different installs of WordPress and I basicly want to open a 3rd install at the root level and stop posting to the other 2.
This is perfect.
One question: How long do I need to keep the other blogs open before I can shut them down?
jay: I honestly don’t know yet. I’m waiting to see how long it is before Google et al. make the changes.
I hadn’t considered your situation of effectively merging two blogs into one but I can’t see why it shouldn’t work. Let me know of any successes or problems.
Excellent plugin Rob. Worked perfectly for me and exactly as advertised!
Oh, the lost art of editing .htaccess … 🙂
Hello,
Just wondering if anyone could help. I did something stupid and started my blog using a numerical archive system, and now I'd like to change it so that the post title is part of the URL for SEO reasons. Is there any WordPress plugins that anyone knows of that could switch it without sending Googlers to invalid pages? Maybe some sort of redirector to the correct page?
Thanks.
Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.
I'm sure Ive seen one…and sifting through the WP site is a nightmare
What I want to do on my blog, is every few hours take the oldest post and move it to the
front of the queue, all automatically. Anyone know if there is a plugin that can do this or
a simple way to set up another plugin to do this (use my own feed perhaps)?
Thanks.
Quentin: If you mean that literally all you would have to do is change the date field of the oldest post to make it become the newest. I doubt very much there’s a plugin to do that but the code should be easy (apart from the ‘every few hours’ bit).
I used this plugin to move my blog from http://ctrl-f5.vectorice.com/ to http://www.aeromental.com/
I did it on Feb 19th, today is Feb 23th and my PageRrank at my new domain is still PR0 “zero” nada 🙁
I had a PR6 in my previous blog.
Did anybody know how long will it be to recover my PageRank?
daniel: I thought that official PageRank was only updated at intervals rather than continuously. Google’s index updates within days though. Do you use Google’s webmaster tools? They can give you a snapshot of the process in action.
is this trick still available for now freely? i need to redirect anawinta.wordpress.com to http://www.qiraati.com how-to?
margono: if you can install the plugin on your original blog it should redirect for you. Please read the instructions carefully.
Does the new site need to have the exact same permalink structure of the old site?
Also, what happens with Technorati, if anyone knows?
Baz: Yes the permalink structure has to be identical for this plugin to work.
Rob, I did wht u said but i cant find when to put the plug-in in? Do you ever know where the easest blog provider to modify its contents also directed domain, pls tell me. thank you.
margono: I’m sorry but I don’t understand your questions…
I mean, is there any blog provider (wordpress, blogspot etc), have an easy plug-in to make redirected domain to our personal domain like this… anawinta.wordpress.com —> redirected to http://www.qiraati.com.
margono: Ah, I see. Since I don’t use a blog provider I really don’t know. I do vaguely remember reading somewhere that wordpress.com offers some paid services that might include such a tool.
Just giving a review.
I used it and it’s excellent. It does what it says and it does it well. ThanX.
The ordinary 301 redirect is nice, but the fact that this plugin shows the new URL in the browser is excellent!!!
Thanks Baz!
I want to move my WP blog from inside a folder on my host to the root so instead of http://dmstrachan.co.uk/journal it lives at http://dmstrachan.co.uk
Am I correct in the assumption that I just need to move the contents of /journal then run your plugin to update the links in the blog itself?
Donna: I think it will be more complicated than that. You need to find some instructions for setting up a new blog in the right place with a COPY of all your posts etc. The export/import method isn’t guaranteed to work since posts can get assigned different slugs. You need to dump the database and load it into your new blog. BazL who commented above covers the process well.
If all goes well at that point you will have two identical blogs at different addresses. What the plugin does is allow you to install it on the OLD blog so that any requests for posts at the old address will be re-routed to the new address. This means that you have to keep the old installation of WordPress active but once you are sure that everything is working well you can get rid of all your old blogs plugins and posts and just keep the skeleton installation with this plugin running.
Ideally if you keep stats at some point you’ll notice that all but a few visitors come to your new blog directly and then you can replace the old blog with a simple information page giving the address of your new blog.
I hope this makes sense.
Hi all, see here… mini-howto, make redirects in all other methods and languages
Hi,
My current blog is an old WP version (2.0), and I’d like to upgrade it to the current version. My host offers Fantastico, but I found that when I upgrade, my blog breaks. So I’d like to copy my old blog (.com) posts, comments, etc. to a new domain name (.net), redirect to the new domain name (.net), update the old blog (.com) to the new version of WP (fixing any breaks, if needed), then going back to the old blog (.com). Will this plug-in enable me to do this?
KWiz: This plugin will only help with one of those steps–the redirection. I’m not sure whether it does what you want exactly though. It redirects with a code for a permanent redirect but from your description you might only want the redirect to be temporary, while you update the original blog?
Yeah, this is a very very cool blog. 😉
I just added you to my favorites.
Thanx,
Mikey
YAY! This plugin worked GREAT! Thank you so much. Moved slashchick.com -> erica.biz painlessly.
Muy buen plugin, me está salvando el tráfico ahora que me he mudado a un nuevo dominio en otro servidor.
Gracias
aahhh
link offline =(
can u fix that link please??
aahhh
link offline =(
can u fix that link please???
Has any one had any major issues with this method? I am Looking at moving my bog over but am hesitant.
Hi, Rob,
When I undated the the new URL, I got an error message saying that “The requested URL http:// was not found on this server.”
What could be wrong?
Thanks
Lichao: What did you enter as the new URL? Also can you give details of your platform, server, etc.
Hi, Rob,
I figured out what the problem is and was able to bypass it, but that’s not an elegant solution. I set up my wordpress installation in a folder called blog and pointed a subdomain at the installation. So the old blog url is blog.example.com and the physical address is example.com/blog.
So here is the line that caused problem
$_SERVER[‘PHP_SELF’] returns the actual physical address, which includes the subdirectory, blog/wp-admin/options-general.php, so the update button actually points to
blog.example.com/blog/wp-admin/options-general.php?page=moving.php, which leads to a 404 error.
My solution was to hardcode the URL into this line, but I bet you will find a better solution.
Finally, this is an excellent plugin and thank you very much for giving it out for free.
We recently released an Update URLs plugin which help replace all occurrences of your old domain with your new domain.
It fixes the permalinks as well as any links within you posts or pages.
It can be found at: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
I’m sure Ive seen one…and sifting through the WP site is a nightmare