WordPress.org

Ready to get started?Download WordPress

Forums

Can I move files from /blog to the root? (23 posts)

  1. sassandperil
    Member
    Posted 5 years ago #

    I was wondering if I could just have http://www.sassandperil.com when you visit my page and click on home, not http://www.sassandperil.com/blog.

    How would I go about doing this?
    Would I need to move the wp files to the root directory and is this advisable? I just notice a lot of wp.org users have their url ending with '.com' instead of '.com/blogs'. How is this done?

    I use Yahoo webhosting and I have asked them to make the wp page my homepage. Everything loads up just fine with the original url but I'd like it to stay just http://www.sassandperil.com not http://www.sassandperil.com/blog.

    Thank ya kindly!

  2. Chris_K
    Member
    Posted 5 years ago #

    How would I go about doing this?

    See either Moving_WordPress or Giving_WordPress_Its_Own_Directory.

    I just notice a lot of wp.org users have their url ending with '.com' instead of '.com/blogs'. How is this done?

    They either use the second link's method (above) or -- more often -- simply install WordPress at the root instead of a sub-directory.

  3. sassandperil
    Member
    Posted 5 years ago #

    I will work with those links above. Thank you much!

  4. sassandperil
    Member
    Posted 5 years ago #

    DOH! Everything looked fine but now I am getting that funky white/blue screen with the page not found error when I click on one of my pages 'about'.

    I moved everything to the /wordpress folder. I also updated and edited the index file just like the link instructed to do. However I could not find a .htaccess file in my directory. Could this be part of the problem? I'm not really that familiar with Permalinks and what functions they serve.

  5. iridiax
    Member
    Posted 5 years ago #

    You are using pretty permalinks, so you do need/have an .htaccess file. This file is normally invisible, so you have to set your ftp program to show invisibles.

  6. sassandperil
    Member
    Posted 5 years ago #

    Thank you, understood. I did read up on that a bit and since I am using Yahoo Small Business hosting I am denied from adding that file to my root or anywhere for that matter! Trust me, I tried it using FileZilla.

    If I don't need to mess with an .htaccess file then why is my site not functioning correctly if I followed this link's instructions?
    Do I need to change any coding within my "pages" to make them appear again an function under the new /wordpress directory? Seems as if some parts of the site are reverting back to the /blog directory.

  7. sassandperil
    Member
    Posted 5 years ago #

    Do I need to change anything in phpMyAdmin so that all the links on my page will work again?

    Also I noticed a discrepancy between the two instructions:

    This one calls for the blog address to be http://example.com and the wordpress address to be //example.com/wordpress (this is what I followed)
    -In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example: http://example.com/wordpress
    -In the box for Blog address (URL): change the address to the root directory's URL. Example: http://example.com

    And this one calls for the addresses to be the SAME:
    -In the box for WordPress address (URI): change the address to the new location of your main WordPress core files.
    -In the box for Blog address (URI): change the address to the new location, which should match the WordPress address (URI).

    which one is correct for my situation?

  8. sassandperil
    Member
    Posted 5 years ago #

    Anyone?

    I have no .htaccess file on my FTP and I have SHOW HIDDEN FILES active. None of the links on my site are working anymore after moving my /blog files to /wordpress in my directory. I have been following these instructions

    AM I OUT OF LUCK??

  9. sassandperil
    Member
    Posted 5 years ago #

    Just got off the phone with Yahoo. They said their "hands are tied" because I am not allowed to alter or upload a .htaccess file.
    They suggest I delete my blog and start over!!

    Currently, the only thing working on my site is my homepage. All my permalinks are down and I cannot, repeat cannot, change or even find the .htaccess file. This is all due to me moving my files to another directory as described here

    Does anyone know a way around this? I am begging you.
    I do not want to delete and start over, it seems ridiculous.

  10. iridiax
    Member
    Posted 5 years ago #

    What happens if you switch back to the default permalinks?

  11. figaro
    Member
    Posted 5 years ago #

    Have you tried moving your entire blog to root? If you are using the site for noting else, then that shouldn't be a problem. See the second video in the following post:

    http://educhalk.org/blog/?p=82

  12. sassandperil
    Member
    Posted 5 years ago #

    Iridiax- I switched back to default and then cleared my cache and cookies and the links are FINALLY working. However, does this mean I am stuck with default permalinks for life? I'm afraid to change anything else now. :/

    Figaro- AMAZING video. I am bookmarking your site.

    Thank you all. I believe I am resolved after all this.

    Whew...time for a drink...haha...

  13. whooami
    Member
    Posted 5 years ago #

    yahoo has their own plugin for pretty permalinks. I can get a copy if you cant locate it.

  14. sassandperil
    Member
    Posted 5 years ago #

    Whooami-oh wow...that would be great! The person I spoke to at Yahoo didn't let me know that

    Figaro- Just double checking, I need to change all instances of the old '/blog' sub directory in my database to the new '/worpress' directory?

  15. Scope
    Member
    Posted 5 years ago #

    before moving the blog, there is a quick and dirty solution

    in the root directory of your site(not the blog/ directory), replace the contents of your default index page with... (again, this is not the index page within the blog/ folder, but the top level index.php in the site root)

    <?php
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    replace /blog/ with whatever your blog directory is called.

    that's it.

    from then on when you type your url http://www.sassandperil.com that root index page will show your blog index page without the http://www.sassandperil.com/blog url.

    however, this changes nothing within wordpress itself, so when you are in your blog any links you have going to your home page.. will STILL go to the original http://www.sassandperil.com/blog

  16. figaro
    Member
    Posted 5 years ago #

    Figaro- Just double checking, I need to change all instances of the old '/blog' sub directory in my database to the new '/worpress' directory?

    Only if you are moving your install from sassandperil.com/blog to sassandperil.com/wordpress. If you are moving it to root, then you would change it from sassandperil.com/blog to sassandperil.com

    Again, I would only do this if you don't plan to use the site for anything but you blog...if you are going to have other things running in root, then I would keep the blog in a subdirectory.

  17. sassandperil
    Member
    Posted 5 years ago #

    ok, quick update.

    Figaro- Thank you. I followed your video for updating the database upon moving from sub to root, but I did sub to sub instead. (I had already moved my /blog files to a new subdirectory /wordpress prior, hence why my permalinks and site weren't functioning right)

    I followed your instructions for export. Then I changed all instances of http://www.sassandperil.com/blog to http://www.sassandperil.com/wordpress except for the Blog name, which is just http://www.sassandperil.com. I did this in the .sql dump file and imported everything back into the database. So now my DB is up-to-date with my subdirectory change, no?

    All my links are working great besides one...my 'ABOUT' page. The 'write' tab shows it there and it appears in the preview but not upon site viewing. Does anyone else see it?

  18. figaro
    Member
    Posted 5 years ago #

    If the only trouble you are having is with the about page, try deleting it and creating a new one.

  19. sassandperil
    Member
    Posted 5 years ago #

    I deleted it all together and the 'about' link/tab is still up there, and of course it is still empty. I added a new one, same thing, content in the preview...no content upon site view.

    I'm going to paste the code of my header.php with the About page added back in. Could it be that the theme I am using is outdated or needs to be further customized? I seem to have read that somewhere looking for a solution to this. Perhaps I am missing something from this line of code?

    <!-- navigation ................................. -->
    <div id="navigation">
    
    	<form action="<?php echo bloginfo('home'); ?>" method="get">
    		<fieldset>
    			<input value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
    			<input type="submit" value="Go!" id="searchbutton" name="searchbutton" />
    		</fieldset>
    	</form>
    
    	<ul>
    		<li<?php if (is_home()) echo " class=\"selected\""; ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
    		<?php
    		$pages = BX_get_pages();
    		if ($pages) {
    			foreach ($pages as $page) {
    				$page_id = $page->ID;
       				$page_title = $page->post_title;
       				$page_name = $page->post_name;
       				if ($page_name == "archives") {
       					(is_page($page_id) || is_archive() || is_search() || is_single())?$selected = ' class="selected"':$selected='';
       					echo "<li".$selected."><a href=\"".get_page_link($page_id)."\">Archives</a></li>\n";
       				}
       				elseif($page_name == "about") {
       					(is_page($page_id))?$selected = ' class="selected"':$selected='';
       					echo "<li".$selected."><a href=\"".get_page_link($page_id)."\">About</a></li>\n";
       				}
       				elseif ($page_name == "contact") {
       					(is_page($page_id))?$selected = ' class="selected"':$selected='';
       					echo "<li".$selected."><a href=\"".get_page_link($page_id)."\">Contact</a></li>\n";
       				}
       				elseif ($page_name == "about_short") {/*ignore*/}
               	 	else {
                		(is_page($page_id))?$selected = ' class="selected"':$selected='';
                		echo "<li".$selected."><a href=\"".get_page_link($page_id)."\">$page_title</a></li>\n";
                	}
        		}
        	}
    		?>
    	</ul>
    
    </div><!-- /navigation -->
  20. Chris_K
    Member
    Posted 5 years ago #

    I suspect you need to create a page named "About" and change your Permalinks to something besides the Default to get that thing working.

    Next time mention you're using Blix... it has some wrinkles!

  21. sassandperil
    Member
    Posted 5 years ago #

    Chris K, yesterday I changed the permalinks to "month and name" however I get a 'page not found' on every single post and the about page. So I reverted back to default.

    Today, I deleted the page "ABOUT" but it is still there even after clearing cache/cookies, logout/login, etc!! This is leading me to believe that there's something overriding it in the Blix theme. To test this I added a new page called "CONTACT" and upon preview it does not add a new tab to the nav it just looks like this with "ABOUT" still present.

    I'm completely stumped. What section would I find the code to be changed? How do I make the friggin' thing go away so that I can start over? Much thanks.

  22. sassandperil
    Member
    Posted 5 years ago #

    I'm giving up. On Yahoo that is. I have spent days now trying to update my permalinks to no avail. I have visited countless articles online about Yahoo's lack of customization. If I cannot access the .htaccess file I cannot fix my permalinks, it's obvious.

    Why did they even partner with WP in the first place!?

    Over it. Thanks to all for helping me try.

  23. livelearncreate
    Member
    Posted 5 years ago #

    Hey I just wanted to let you know that I've found that if you switch to the default Permalink setting and make sure that you pages can be seen, then switch back to your custom or 'pretty' setting everything should work.

    Had the same issue but I let WordPress admin do the work of adjusting things rather than dig into my database.

    Maybe this will help?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.