I'm going to move my blog from http://blog.wordfruit.com to http://wordfruit.com/blog

the main Wordfruit site is in PHP and the blog is WordPress.

I know I can make the change at wp-admin/options-general.php

...I want to make sure I don't create problems when I make that change...

  1. Do I not need to create any folders etc on the domain? Will they just create themselves when I make the change?

  2. Can I redirect the old urls to the new urls from within the WordPress account?

  3. Are there any other things I need to account for in making this change?

Cheers, Richard


First you should read the Codex entry on domain moving http://codex.wordpress.org/Moving_WordPress

But in a nutshell: aside from moving your contents phisically to the /blog location, all you have to do is search and replace every SQL entry for the previous domain (instead of just changing the domain in Wordpress options). Doing this by hand is pretty dangerous, I found this script to be very helpful: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Backup your database (eg. with PHPMyAdmin) in SQL form, then upload the above php script to your host folder, and point your browser to it. Using it you can safely search & replace http://blog.wordfruit.com to http://wordfruit.com/blog.

All your post contents and options will be then rewritten to the new domain. What possibly could remain is your page template - if you made it yourself, I'd also download and search the contents the theme folder for possible hard links to the old domain.


I have played with those options myself and would recommend doing this instead.

  1. Copy all physical files to new location and delete wp-config.php
  2. Use a back up plugin and export all content and options
  3. Install the new blog on a new database or with a new prefix
  4. Import all of the content and settings back into WordPress
  5. Check that everything is working on the new site
  6. If everything is working delete the old sites database and files
  7. Redirect the old sites domain to the new location

I know this seems strange given the settings but whenever I used the change domain settings it didn't work and it broke the site, I then had to manually change it back through wp_config.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.