• I’m trying to make a local copy of a live site for test purposes but am having problems loading it.

    The live site runs an estore and was produced commercially.

    The developers have given me access to a backup.

    I have created a WordPress website locally and loaded it from a SQL file provided, but what happens is that when I try to access the local site I get a redirection to the live site.

    Can anyone suggest what I can do to prevent this redirection?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @balanga – you need to change the home and siteurl values in the wp_options table in the database to the address of your local site.

    For example, if your local site is in a folder named mylocalsite, then the values of the above two fields should be: http://localhost/mylocalsite

    Doing this should allow you to login to the local site where you can install this plugin to update the rest of the URLs and links:

    https://wordpress.org/plugins/better-search-replace

    Once you have done that, go to Settings > Permalinks and just click Save Changes; this rebuilds your local htaccess file.

    Cheers!
    Lyle

    • This reply was modified 7 years, 1 month ago by snifflevalve. Reason: typo
    Thread Starter balanga

    (@balanga)

    Thanks for your reply. I just checked the wp_options table and that is correctly set. Viewing the site is OK (sort of..). The redirection actually takes place when I try to log in… ie

    localhost/wordpress/wp-admin/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Making local copy of live site’ is closed to new replies.