Cloned site over to test PHP upgrade, navigation broken (problem solved)

I’m helping a friend out with her small site and I was trying to set up a copy of the site to test certain updates locally (including a PHP update from 5.2 to 5.6), but the links are all broken; I can only get the homepage to load. I’m guessing it’s something really simple that caused the links to break, but I’m rather inexperienced with WordPress so I’m not sure where to start.

I ran this SQL command that replaced the URL with the local one, so I’m not sure if that somehow broke the links (some links aren’t broken):

SET @oldsite=''; 
SET @newsite='';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);

I exported the database manually via phpMyAdmin, imported it via Local’s Adminer, and then used Updraft Plus to grab the “themes”, “uploads”, “plugins”, and “others” folders it generates to copy them over to the site on Local.


Was able to fix it by going to WordPress dashboard -> Settings -> Permalinks -> “Save changes” (updated structure without changing anything in the Permalinks menu) – sorry to make a post here about this, looks like it had nothing to do with Local.

Excellent Reid. Glad you were able to get you issue resolved. :slight_smile:

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.