How to transfer one WordPress site database to another domain

Ever wondered how to transfer one WordPress site database to another domain? Here’s how step by step. Let’s say you have a site at domainone.com and you want to move it to domaintwo.com/yoursite and you have cPanel.

  1. go to domainTwo.com/cpanel and install wordpress in a new folder or directory called ‘yoursite’ (using fantastico’ from your cpanel)
  2. Now go to domainOne.com/wp-admin and click on ‘Tools’, then click on export to export the whole site to your desktop
  3. Now go to domainTWO.com/YOURSITE/wp-admin and click on Tools, then click on import to inport your site to this new location. THAT’s it!

You can now see the new database for your site when you go to domainTWO.com/cpanel and click on ‘phpmyAdmin’. The new database should be located on your left hand. Click on it to see all the tables that have been created. Your posts/pages should be located in a table named something like wp_………posts

WP CMS Hack: How to List WordPress Subpages Links using wp_list_pages()

Are you using WordPress as a CMS and want to know How to List WordPress Subpages using wp_list_page().

wp_list_page() is an important function nicely implemented in the newer versions of WordPress as WP becomes a more mature CMS. Creating Subpages (also called childpages and grand childpages) is one nice feature which you can use to really extend the functionality of WP as a CMS. Now let’s say you want to display all the childpages of a particular parent page while viewing the parent page or one of the other childpages, then you can use the following trick.

Here are the steps:

  1. Create a DIV element in your stylesheet.css like this one: #subpageslistings { float:left; display:inline; margin:55px 0 0 -10px; color:#777; }
  2. Now insert the following code, wherever you want these links to appear (header, main page content area or sidebar?)<div id=”subpageslistings”>
    <?php
    $output = wp_list_pages(‘echo=0&depth=1&title_li=<h4> Other Links </h4>’ );
    if (is_page( )) {
    $page = $post->ID;
    if ($post->post_parent) {
    $page = $post->post_parent;
    }
    $children=wp_list_pages( ‘echo=0&child_of=’ . $page . ‘&title_li=’ );
    if ($children) {
    $output = wp_list_pages (‘echo=0&child_of=’ . $page . ‘&title_li=<h4>Other Links</h4>’);
    }
    }
    echo $output;
    ?>
    </div>
  3. Now spice it up with some CSS styling and let it look the way you want!

Hope this helps.