• Resolved ovenmithead

    (@ovenmithead)


    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)
  • Thread Starter ovenmithead

    (@ovenmithead)

    Yes. Updated wordpress to most recent version, uploaded XML file, pulled over wp-content folder for theme changes, etc.

    Thread Starter ovenmithead

    (@ovenmithead)

    Its seeming to me like the options-reading.php file is not updating properly

    Thread Starter ovenmithead

    (@ovenmithead)

    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

    (@ovenmithead)

    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

    (@ovenmithead)

    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

    (@ovenmithead)

    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.