How to move your blog to subfolder

Often you need to move your blog from to You might want to test something and does not want to interfere with your blog. A way to do this is by creating a clone of your blog in subfolder. So how do you do it? Assume that your blog is at, here’s how:

  • Download database backup plugin from
  • Activate the plugin
  • Backup your database using your plugin. Go to ‘Manage’ -> ‘Backup’ menu. Choose ‘All tables’ and download the backup file to your computer. You will get a zip file with .sql file in it.
  • Extract the .sql file
  • Backup the .sql file. You can just copy the .sql file to another folder
  • Open the .sql file using notepad.
  • Replace ‘’ with ‘’
  • Create a new wordpress blog at sub folder i.e.
  • Loggin into your phpmyadmin. You usually can find your phpmyadmin at cpanel.
  • Click databases, and select the database that you will be importing your data into.
  • Across the top of the screen will be a row of tabs. Click the Import tab.
  • On the next screen will be a Location of Text File box, and next to that a button named Browse.
  • Click Browse. Locate the .sql file stored on your computer which you have modified using notepad.
  • Make sure the SQL radio button is checked.
  • Click the Go button.
  • You should now have a new blog at
  • Contact me if you have any problem.


  • If you have huge database, you might want to reduce the size so you can import small database. What makes the database that huge is usually your post. So in order to reduce the size, you need to delete some post in the .sql file. Open the .sql file and search ‘wp_posts’ word. Find something like : “INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
    ( x,x,x,x,x,x,x,x,x,x,x,x,x,x,x),
    ( x,x,x,x,x,x,x,x,x,x,x,x,x,x,x),
    ( x,x,x,x,x,x,x,x,x,x,x,x,x,x,x)”.

    This is the command to insert data to your database. So you need to remove the
    ( x,x,x,x,x,x,x,x,x,x,x,x,x,x,x). To see the difference download this zip file, and compare the two files. The old.sql will insert two data, while the new.sql will only insert one data.

Mar 23, 2009 by
GreenGeeks WP Web Host ad ad ad ad