I tried restoring a backup to my WordPress blog through MySQL. I thought I did everything right, but apparently there is a major error, because when you visit my site there is a line at the top that says: Warning: Invalid argument supplied for foreach() in /home/ccano/public_html/wp-includes/classes.php on line 1542 Here are lines 1540-1548 of classes.php: // Look for matches. $request_match = $request; foreach ($rewrite as $match => $query) { // If the requesting file is the anchor of the match, prepend it // to the path info. if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) { $request_match = $req_uri . '/' . $request; } Also, when you try and click a post title to go to the individual page, the new page looks exactly like the home page. Anyone know what I can do? I'd appreciate your help. My site is http://www.digitalmusictracker.com
1. the original and the new sites use the same wordpress version ? 2. try this. go into your options > permalinks and choose the default option. and hit save. 3. see if the single post displays different than the main page. 4. if yes, then go back to options and permalinks and change it to what you want and hit save. hope that helps.
It works! I was in a panic. Thanks so much for helping me fix this. Do you have any idea why it does that?
because any custom Permalinks are stored in .htaccess file that is present in the wordpress installation folder. when you move to a new installation, this file may not be copied over and will be empty. but everytime you change the permalink options, it gets regenerated and thus it solves your problem. Thanks Sadish