• I think this is an easy problem to solve, but I can’t figure it out.

    I originally installed WordPress in a /wp directory in root. I’ve since moved the index file to the root level, and left everything else in /wp. I changed the path in the admin accordingly, and everything works and publishes just fine. I access my admin in /wp/wp-admin just fine. The only quirk I noticed was that a second index also continues to publish in the usual directory within /wp (it’s /wp/wp-content/index.php).

    Everything works except previewing. The preview button brings up an error message, saying “nothing found” – because the url is wrong for the preview. It’s trying to load a preview on the root dir (“.com/?p=”), but I have to manually add the /wp to see the preview load.

    Thoughts on where to fix this glitch? I’d love to also delete that second index from publishing in the process – something tells me it’ll happen automatically with this fix – but really need to get preview working first.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter erictabone

    (@erictabone)

    Yeah, the answer is not there. I’ve reviewed that a few times, but no dice.

    You said you “moved” the index.php to the root. You don’t move it, you copy it. The original index.php should still be in the wp folder. Did you change this line require('./wp-blog-header.php'); to require(‘./wp/wp-blog-header.php’); in the index you copied to the root? Did you upload a copy of the .htaccess to the root as well?

    Thread Starter erictabone

    (@erictabone)

    Correct, I copied index.php, not moved it, which is why I have 2 (sorry, I used the wrong word there).

    Yes, the header path was changed correctly before, to include the /wp dir.

    No, I don’t believe I copied any .htaccess file because I didn’t have one in /wp. I did have an old .htaccess file in root for my previous blog setup, but I think I had backed that up and deleted it, and let WP generate a new one. I don’t remember that step entirely, but regardless, there IS an .htaccess file in root now, and it just reads:

    # BEGIN WordPress
    
    # END WordPress

    Should there be more code in that file?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Preview not working correctly’ is closed to new replies.