Forums

[resolved] followed directions for giving wordpress its own directory, lost all formatting (12 posts)

  1. anodyna0477
    Member
    Posted 5 months ago #

    Hi, I followed the directions in the Codex for Giving WordPress Its Own Directory, and now all my formatting (theme and child theme) have been lost, and I'm unable to access any wp-admin features for my site.

    This is a case where I have wordpress installed in a subdirectory of my site, but I want users to be able to see the blog as if it is installed in the root directory.

    Here are the steps I took:

    1. I installed WordPress 3.3 fresh today into a subdirectory of my site, http://raftersofcedars.com/wordpress/.
    2. I installed my plugins (Jetpack and TwentyEleven Theme Extensions), installed my child theme (a child of twentyeleven), and did all my other setup of user, colors, header, etc. Everything looked fine.

    THEN
    3. I followed the directions in the section of this Codex page labeled Using a pre-existing subdirectory install:

    - In the General panel, I changed the "Site Address" setting to the root url (http://raftersofcedars.com)
    - I clicked "save changes" and got the error message that the instructions tell you to ignore
    - I copied (not moved) the index.php file from the wordpress directory on my server to the root directory. There was no .htaccess file so I didn't copy it. (I am set up to see all hidden files.)
    - I opened the root directory's index.php file in a text editor (dreamweaver) and changed the line
    require('./wp-blog-header.php');
    to
    require(./wordpress/wp-blog-header.php')
    and uploaded the changed file back to the root directory on the server

    When I go to my site, all the formatting from the theme and child theme is gone. My header and background image are there, and the color choices I made in "Theme Options" using the TwentyEleven Theme Extensions plugin are being used, but all all styling is missing. This is the same whether I access the site from http://raftersofcedars.com or http://raftersofcedars.com/wordpress/

    When I try to go to http://raftersofcedars.com/wordpress/wp-admin/ I get redirected to raftersofcedars.com/wp-login, which doesn't exist so I get a 404 error.

    I believe I performed all the steps in the Codex article exactly as written and I'm at a loss about why the results are so broken. I also can't figure out what steps I can do to reverse the change I made in the admin panel since I can't access it. This is a new blog with no content yet, but I really don't want to have to wipe out a day's work and start over, or have to abandon the plan for keeping the wordpress files in their own directory--to have all these files at the root of my site seems like it will become a mess.

    Thank you for any suggestions you have!

  2. Jonas Grumby
    Member
    Posted 5 months ago #

    I copied (not moved) the index.php file from the wordpress directory on my server to the root directory.

    You should move, not copy, all of your WP files and folders into the root directory, or wherever you specified in Settings > General.

  3. anodyna0477
    Member
    Posted 5 months ago #

    Thank you Jonas. I'm actually wanting to keep the files in the subdirectory, which is the scenario the Codex article is supposed to be addressing! Are you suggesting that I move everything temporarily so I can fix something, or would this be the "give up on the subdirectory completely" option?

  4. Jonas Grumby
    Member
    Posted 5 months ago #

    give up on the subdirectory completely

    http://codex.wordpress.org/Moving_WordPress

    See step 9.

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 5 months ago #

    Are you sure you properly updated the URL?

    You may need to check inside the database.

    Your install is looking in your root for the style.css

    http://raftersofcedars.com/wp-content/themes/twentyeleven_rafters/style.css

    whereas, if the URL was changed properly in general settings (and thus the database) it should be looking in

    http://raftersofcedars.com/wordpress/wp-content/themes/twentyeleven_rafters/style.css

    If you can get that URL properly changed, you should be all set

  6. Jonas Grumby
    Member
    Posted 5 months ago #

    I'm honestly not sure why anybody would do a fresh install in a subdirectory and then immediately want to move it, but the bottom line is to make sure that your files are where the database expects them to be. You may also want to read this article which addresses how to change the URL in the database (if you need to).

    http://codex.wordpress.org/Changing_The_Site_URL

    If you entered the URLs correctly, all you have to do is move the files and then check things like your upload directory and settings for plugins that store files on the server (like db backup plugins, xml sitemaps, etc.).

  7. anodyna0477
    Member
    Posted 5 months ago #

    Rev. Voodoo, thank you. I feel like I was careful to follow the steps in the article, but clearly something isn't right! I'm sorry to hear that fixing it might require checking inside the database--I think that's beyond my capabilities. If I can fix it by editing a .php file then I'd be okay, otherwise I think I might have to start over. :(

    I'm honestly not sure why anybody would do a fresh install in a subdirectory and then immediately want to move it,

    Hey Jonas, I don't actually want to move it. I installed it in a subdirectory on purpose! :) I'm just trying to do what the Codex article describes:

    Many people want WordPress to power their site's root (e.g. http://example.com) but they don't want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your blog exist in the site root.

    It's actually quite a typical scenario! It's just that for some reason my attempt at it failed and I can't seem to fix it. I appreciate your tips, though, and it may be that doing it the ideal way the article suggests just isn't in the cards.

    ETA: Looking at the General Settings admin panel for my test site in another location, I think I may have changed the WordPress Address URL instead of the Site Address url. I think I may just need to kill it and start over, darn.

  8. Jonas Grumby
    Member
    Posted 5 months ago #

    You are supposed to change them both. If you only changed one, then you do have to take one of the steps to correct it in http://codex.wordpress.org/Changing_The_Site_URL

    What do you suppose is the advantage of keeping the files in a sub-directory? I can assure you, there is none.

  9. Jonas Grumby
    Member
    Posted 5 months ago #

    If it's because you want to have multiple instances of WordPress in different subfolders on your server, then use your hosting control panel to point your domain name to the subfolder instead of moving files around.

  10. anodyna0477
    Member
    Posted 5 months ago #

    Jonas, thank you so much! That article was exactly what I needed to fix the problem. I followed the steps to fix the site using functions.php. You saved me--I was afraid the only way to fix it was by going into the database.

    After I fixed it, I did go back and redo the original steps that got me into trouble. I'm pretty sure the original problem was that I changed the wordpress directory instead of the site directory. It all works fine, now--my files are in the subdirectory but the blog comes up when I put in the url for the root. I really appreciate your help!

  11. Jonas Grumby
    Member
    Posted 5 months ago #

    Glad it worked. With these kinds of changes everything is always there. It's just a matter of getting the database and the files to agree on what is where.

  12. Rev. Voodoo
    Volunteer Moderator
    Posted 5 months ago #

    I'm honestly not sure why anybody would do a fresh install in a subdirectory and then immediately want to move it

    I don't think it's the case here, but often, auto 1 click installers drop WP into a subdirectory. Folks may have intended to run it from root. That's what godaddy used to do, back in the day before I handled things manually

    Moving the index.php to root and changing 1 of the URLs in general settings allows for the site to run from root, but keep the files in the subdir to keep the root dir tidy. It's how I roll yo!!

    @anodyna0477, glad you got it sorted. I remember how confusing it was when I first tried to do what you did. I screwed it up and gave up twice before I finally got things right

Reply

You must log in to post.

About this Topic