[resolved] Importing live website database to localhost redirects to website post login (7 posts)

  1. shadez
    Posted 1 year ago #

    I took a backup of my live website DB tables, installed a fresh 3.7 WP installation(new 'test' folder) on XAMPP with a new database, keeping the tables in new DB as is, i imported the live website tables into it.

    now my problem is that:
    1. when i go to http://localhost/test/ i find a white screen.
    2. when i visit localhost/test/wp-admin or localhost/test/wp-login.php, it takes me to the 'live' site login page - say http://example.com/wp-login.php.

    can somebody tell me whats going wrong?

    localhost and gives same result
    UID, pass, server, etc - are good.. i installed it, imported db and then face this problem.
    $table_prefix was different (say wp_test_) but i made sure its changed before installation
    i tried using same admin username and different in seperate installs - no results
    php.ini files are proper and its a clean import of all 28 tables

  2. shadez
    Posted 1 year ago #

    solved by:
    1. issue was with permalinks structure.. reverted to default and working fine now.
    2. edited siteurl and home in wp_options table

  3. OrmigaDesign
    Posted 1 year ago #

    Hi everyone,

    I'm relatively new to wordpress. I have tried it in the past but it always intimidated me... However, I have just started a job at a company and their website is a WordPress.org site. I need to get the hang of it and be able to maintain the site. I have already bought Digging into WordPress by Jeff Starr and Chris Coyier.
    However, I have this task I need to do, and I am pulling my hairs to figure it out...

    I need to create a new careers page, so I have installed wordpress locally, but from scratch. Now, my difficulty is moving the live site to the local host. I have tried through FTP, by replacing all the files from the live site to the wp files I installed when I installed the local host. Same with the DB, I have imported the live site's DB to phpMyAdmin and changed the path in the config file so that it knows which db to call, but then it says it can't establish a db connection. I tried downloading the duplicator plugin to the live site, but when I tried to duplicate the site, it didn't pass, I got a few errors and I don't know how to fix them.
    Then I tried the export feature in the live site, but in the localhost, the import plugin does not work... so I'm running out of options. I haven't even gotten set up yet... and I still have to figure out how to create that page... I'm scared! I need the help of you pros out there. I love learning new things and WP has been on my list for years. Now it's time.
    I'm set on succeeding with this, but I need to do it in the next week, so I know I need help.

    Thanks a million to anyone who can help!


  4. OrmigaDesign
    Posted 1 year ago #

    Oh, I forgot to say, I do understand code intermediately. I am no expert, but I have created HTML and CSS sites, I did some php in the past... so this is not all alien to me... and I know I can learn it.

    Help, please!

  5. OrmigaDesign
    Posted 1 year ago #

    Well, I tried doing it with this tutorial:

    But I keep getting an error message saying the following:
    Error establishing a database connection

    I have tried several times, even through a remote server, but for some reason it's just not connecting to the db... I don't know what I'm doing wrong. I have followed that tutorial step by step and no luck... I don't know what else to do...


  6. OrmigaDesign
    Posted 1 year ago #

    New problem. So I finally got it to work, kind of... I can only see the home page of the live site locally, the links are not working and the images are not showing... and when I go to login, it doesn't recognize my user name and password.
    When I replaced the live site files for the standard wp files that come with the download, it just doesn't recognize my username and password to login to the admin page to make any changes in wp. Anyone know how to fix this?


  7. ChecMark
    Posted 11 months ago #

    I'm having the same issue. I am making a lot of small changes creating a form and doing the "preview" is very time-consuming. There must be way to in essence "work offline" on my site. Everything I've read looks SO complicated.

    Appreciate any help on this.

Topic Closed

This topic has been closed to new replies.

About this Topic