• So I’ve backed up my live wp db and restored it to mysql on my local machine using phpmyadmin. I can see it in the mysql window but when i go localhose/wordpress the posts aren’t there

    i’m assuming i need to reset some php files to “point” at the right db – any ideas????

Viewing 5 replies - 1 through 5 (of 5 total)
  • wp-config.php

    See Editing wp-config.php and Moving WordPress.

    Thread Starter benkepes

    (@benkepes)

    so…

    wp-config.php reads as follows

    <?php
    // ** MySQL settings ** //
    // ** MySQL settings ** //
    define(’DB_NAME’, ‘wordpress’); // The name of the database
    define(’DB_USER’, ‘root’); // Your MySQL username
    define(’DB_PASSWORD’, ”); // …and password (needs to be empty, just for local install)
    define(’DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    define(‘WP_HOME’, ‘http://localhost/wordpress&#8217;);

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    i have also changed “siteurl” and “home” in the database table “wp_options” to http://localhost/wordpress
    in phpmyadmin i can see the db and have done some queries and the db looks fine

    localhost/wordpress returns an “error establishing a db connection”

    any more ideas?

    Thread Starter benkepes

    (@benkepes)

    so now I can login and see dashboard and posts etc – but when I click on “visit site” it takes me to localhost/wordpress and a blank page

    strange?

    And you followed all the instructions in Moving WordPress?

    Thread Starter benkepes

    (@benkepes)

    sorted now – but I’ve seen somewhere a hack to allow both localhost and hosted db’s from the same db (ie it’ll default to local host when it sees it – otherwise hosted db)

    any idea where I can find that hack?

    cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘restoring wp db to local sql’ is closed to new replies.