WordPress.org

Ready to get started?Download WordPress

Forums

Changed WordPress to use root directory now can't preview posts (11 posts)

  1. alexlovesjam
    Member
    Posted 2 years ago #

    Hi, I followed the instructions here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory my blog was already in it's own directory /blog/ so I followed the instructions so it would be accesible from the root directory without moving it. However now when I try to preview a post I'm writing I get a 404 error.

    I've tried using a different browser, clearing browser cache, using the default theme, and deactivating plugins.

    Any help would be much appreciated! Thanks.

  2. D M
    Member
    Posted 2 years ago #

  3. alexlovesjam
    Member
    Posted 2 years ago #

    Yep I did.

  4. D M
    Member
    Posted 2 years ago #

    Did you: Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory?
    Root directory would be /html or /public_html or /www

    Asking this because we should look at each step in the process.

  5. alexlovesjam
    Member
    Posted 2 years ago #

    Yep, I duplicated those 2 files and moved the copies to the root directory.

  6. D M
    Member
    Posted 2 years ago #

    What text editor did you use - a plain text editor like Notepad (windows) or a rich text editor such as Wordpad (windows)

    And, in here:
    Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');
    ...what did you put here (bold text) - /wordpress/wp-blog-header.php - the name of the directory your WP files are in?

  7. alexlovesjam
    Member
    Posted 2 years ago #

    I used a plain text editor called Textmate for Mac. And I changed the index.php file in the root directory to require('./blog/wp-blog-header.php');

  8. D M
    Member
    Posted 2 years ago #

    Everything seems fine. May I have your site url, please?

  9. alexlovesjam
    Member
    Posted 2 years ago #

    http://alexlovesjam.com

    Editing an already published post and then previewing the edit leads me to a page saying this: "You do not have permission to preview drafts."

  10. D M
    Member
    Posted 2 years ago #

    As you are using permalinks, did the last step, #8, go fine for you?
    Such as, did the .htaccess file get updated?

  11. alexlovesjam
    Member
    Posted 2 years ago #

    Hey sorry for the slow reply. Yes permalinks are updated fine.

    EDIT: It seems to be working now. I came back after going out and logged back into admin and it's working. Maybe it was a cache issue. Thanks for taking the time to help me!

Topic Closed

This topic has been closed to new replies.

About this Topic