Support » Localhost Installs » Removing website links

  • Hi,

    I’ve been trying to run the website offline on my PC as much as possible so I can do experiments on the design.
    I’ve downloaded all the website’s resources from cPanel and installed it successfully on my XAMPP.

    The problem is, whenever I clicked a button, it sends me to the website itself – i.e.(http://www.examplesite.com/about-us) instead of (localhost/site/about-us.php)

    I’ve been looking everywhere on the files to where I can change these url’s but to no avail.

    If anyone could enlighten me on how to do this to the whole website would be very much appreciated 🙂

Viewing 1 replies (of 1 total)
  • I had your dilemma a few weeks ago after installing XAMPP and downloading several sites and their databases to my local machine. To update those databases, I used this SQL code in phpMyAdmin after editing “pref” to the appropriate table_prefix and placing the old and new URLs in place of http://www.olddomain.com and http://www.newdomain.com:

    UPDATE pref_options SET option_value = replace(option_value, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    
    UPDATE pref_posts SET guid = replace(guid, 'http://www.olddomain.com', 'http://www.newdomain.com');
    
    UPDATE pref_posts SET post_content = replace(post_content, 'http://www.olddomain.com', 'http://www.newdomain.com');
    
    UPDATE pref_postmeta SET meta_value = replace(meta_value,'http://www.olddomain.com', 'http://www.newdomain.com');

    note: That is also good for making all of those either www or non-www.

Viewing 1 replies (of 1 total)
  • The topic ‘Removing website links’ is closed to new replies.