• I had my site up and running at https://www.visitcvfarm.com. While editing the template, I generated an error in the function.php file that resulted in a blank screen and inability to login. I fixed the issue by uploading a new function.php file via ftp, but not before I deleted the index file from my root directory. I changed the general settings back to the WordPress directory (www.visitcvfarm.com/blog) and the site is working there, but now I can’t get it back on visitcvfarm.com.(I’ve added a redirect from this url as a temporary fix.) The “require(‘./wp-blog-header.php’);” line is no longer in the index file. The index file is here https://wordpress.pastebin.com/JDvyQqPj

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter cvf

    (@cvf)

    Thanks. I reviewed that section and added <?php require('/the/path/to/your/wp-blog-header.php');?> The site now works from visitcvfarm.com, but it added the right sidebar to every page instead of just the blog page. I can switch the blog address back to the wordpress directory /blog, and the sidebar goes away. Any thoughts?

    Every page on the main site or every WordPress page?

    Thread Starter cvf

    (@cvf)

    All of my WordPress files are at https://www.visitcvfarm.com/blog. If I leave the blog url at https://www.visitcvfarm.com/blog, I have a right sidebar on my main post page and no sidebar on any of the other five pages created through wordpress (the way it’s supposed to be). When I move the blog url to visitcvfarm.com and put the index.php in my root directory, every page (the main post page and the other five wordpress pages) shows the sidebar.

    When you switch over to the main domain, are you following the instructions in Giving_WordPress_Its_Own_Directory?

    Thread Starter cvf

    (@cvf)

    Yes, following those exactly, except I’m having to manually input<?php require('./blog/wp-blog-header.php'); ?> because there is no require in the index file. (There’s a link to the original index file in my first post.) When I set it up the first time before the site crashed, the require code was in there and I just edited it, but now it’s gone. If it seems completely out of whack, I can try downloading the original theme and manually inserting that index file, I guess. Would that mess up the site if I replaced the index file via ftp? Thanks for all your help.

    Thread Starter cvf

    (@cvf)

    Downloaded the new index file and still do not see the require command. Did realize that when I move it to the url without /blog, it is pulling an older header.php file. Set to the the /blog url, it uses the correct header.php file. Looked through all of my files on the ftp and I can only find one header.php file, which is the correct one. Cleared my browsers history and cache repeatedly, so I’m completely lost at this point.

    What version of WP are you using. The index.php in WP 2.9.2 has require at line 17:

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can’t post blog back to root directory’ is closed to new replies.