Title: Problems with root-directory
Last modified: August 22, 2016

---

# Problems with root-directory

 *  Resolved [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/)
 * Hi, for the past couple of months, I have been working on a production site to
   move from one location to another on wordpress. I had no issues on the production
   side, however when I moved the XML and wp-content folders over to the new server,
   the root directory and post directory will not change, even through the reading
   settings. I have tried resetting permalinks, to no avail. Any help is greatly
   appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926463)
 * Did you follow this? [http://codex.wordpress.org/Moving_WordPress](http://codex.wordpress.org/Moving_WordPress)
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926597)
 * Yes. Updated wordpress to most recent version, uploaded XML file, pulled over
   wp-content folder for theme changes, etc.
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926598)
 * Its seeming to me like the options-reading.php file is not updating properly
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926599)
 * Is there any way I can maybe over-write the file so that it will have the pages
   that I want? I don’t plan on changing, just when I pulled the XML file over, 
   rather than over-writing existing pages (home, etc.) it just created new pages,
   so I ended up deleting the old home page and blog pages, and now I’m having this
   problem.
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926600)
 * It acts like it updates the page, and when I come back, the pages are still stored,
   but its like the file itself does nothing to the rest of the site.
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926601)
 * I’m seeing something in my link-template.php file that seems to be what I’m looking
   for to overwrite, but I’m not sure how to syntax it.
 *     ```
       /**
        * Retrieve the page permalink.
        *
        * Ignores page_on_front. Internal use only.
        *
        * @since 2.1.0
        * @access private
        *
        * @param int|object $post Optional. Post ID or object.
        * @param bool $leavename Optional. Leave name.
        * @param bool $sample Optional. Sample permalink.
        * @return string The page permalink.
        */
       function _get_page_link( $post = false, $leavename = false, $sample = false ) {
       	global $wp_rewrite;
   
       	$post = get_post( $post );
   
       	$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
   
       	$link = $wp_rewrite->get_page_permastruct();
   
       	if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
       		if ( ! $leavename ) {
       			$link = str_replace('%pagename%', get_page_uri( $post ), $link);
       		}
   
       		$link = home_url($link);
       		$link = user_trailingslashit($link, 'page');
       	} else {
       		$link = home_url( '?page_id=' . $post->ID );
       	}
   
       	/**
       	 * Filter the permalink for a non-page_on_front page.
       	 *
       	 * @since 2.1.0
       	 *
       	 * @param string $link    The page's permalink.
       	 * @param int    $post_id The ID of the page.
       	 */
       	return apply_filters( '_get_page_link', $link, $post->ID );
       }
       ```
   
 * the comment starts on line 338
 *  Thread Starter [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * (@ovenmithead)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926705)
 * I found the issue. My theme apparently over-writes the wordpress homepage and
   I had not been looking in my theme options.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Problems with root-directory’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [ovenmithead](https://wordpress.org/support/users/ovenmithead/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/problems-with-root-directory/#post-5926705)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
