Running Wordpress Locally

5 replies
Hi,

I just installed WP on my local WAMP server to make some mods, but when I am previewing it, it keeps re-directing me to my online website.

I think this is the setting in the control panel where you set the url for the website. I need to find that entry in database and adjust it to localhost. Does anyone know where it is?

Thanks
#locally #running #wordpress
  • Profile picture of the author GuerrillaIM
    As is always the case, right after I post I find it. Was in options table. I have a lot of extra tables in this database so it was confusing me.
    {{ DiscussionBoard.errors[1672074].message }}
  • Profile picture of the author HomeBizNizz
    Look at the config table.
    The value is your URL.
    {{ DiscussionBoard.errors[1672097].message }}
  • Profile picture of the author GuerrillaIM
    Well, the index page works. All internal pages are not found for some reason.
    {{ DiscussionBoard.errors[1672159].message }}
  • Profile picture of the author mywebwork
    WordPress uses absolute URL's in the wp_posts table in a couple of fields

    1- The "guid" field

    2 -The "post_content" field (for posts linked to one another internally)

    A Couple of queries to get you going - replace 'http://www.new-domain.com' with whatever you defined your new installation on your local machine as:

    Code:
    UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
    
    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
    Hope this helps!

    Bill
    {{ DiscussionBoard.errors[1672313].message }}
  • Profile picture of the author GuerrillaIM
    Thanks. I found out the 404 error was because i needed to enable rewrite on apache.

    Thanks again.
    {{ DiscussionBoard.errors[1672933].message }}

Trending Topics