• Hi,

    I am new to wordpress.
    I have it installed properly on my localhost – running apache 2.4, MySql, and Php 7.

    I copied the contents of the website final.godharmic.com from my server
    directory into my Apache\htdocs folder.The site is running on wordpress.
    Also copied the database from the server, and configured the relevant config files.
    I can’t seem to get it working properly on my localhost.
    When i run localhost/final (type this on my browser – final is the directory of the site I have downloaded)
    My guess is that I have to change a few links or entries on the database itself? Or alternatively could someone point out how to get a working wordpress website running on my localhost.

    There are various plugins which the website is using.

Viewing 2 replies - 1 through 2 (of 2 total)
  • My guess is that I have to change a few links or entries on the database itself?

    Yes, and I do that with this edit-as-needed SQL code at phpMyAdmin:

    * note: Edit ‘pref’ (three places) to your own table_prefix and change ‘https://www.olddomain.com’ and ‘https://www.newdomain.com’ as required (three places each and with no trailing slashes)

    UPDATE pref_options SET option_value = replace(option_value, 'https://www.olddomain.com', 'https://www.newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE pref_posts SET guid = replace(guid, 'https://www.olddomain.com', 'https://www.newdomain.com');
    UPDATE pref_posts SET post_content = replace(post_content, 'https://www.olddomain.com', 'https://www.newdomain.com');
    Thread Starter nemesis45

    (@nemesis45)

    Thanks a ton!
    Worked like a charm.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Copying a WordPress site into LocalHost, for testing’ is closed to new replies.