WordPress.org

Ready to get started?Download WordPress

Forums

Removing subdirectory installation from site URL (2 posts)

  1. Matt Koppelman
    Member
    Posted 1 year ago #

    I was able to install WordPress to a subdirectory on my server (done for organizational purposes) but I'd like to avoid having my site's URL be DOMAN/subdirectory.

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    says to copy the original index.php but move the .htaccess file but later posts say that the installation process doesn't necessarily create the latter.

    Used the FTP to create a new file (named .htaccess, 755 chmod) yet directing a browser towards the Site URL as edited in the WordPress preferences still gives the standard "your website is ready" message. What am I doing wrong?

    http://www.paralysisfromanalysis.com/

  2. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    The way I'd do it:

    1. In WordPress, set your "pretty" permalinks by going to Settings->Permalinks and selecting something other than default (your preference), clicking save.

    2. Then copy index.php and .htaccess from your subdirectory install to your root folder (e.g. http://example.com/wp/index.php and http://example.com/wp/.htaccess to http://example.com/index.php and http://example.com/.htaccess)
    Note: .htaccess may be "hidden" depending on the settings of your FTP client.

    3. In WordPress, in Settings->General, update the site URL.

    Creating a blank .htaccess file in root wouldn't handle it; it needs to be the one from WordPress.

    If you aren't using pretty permalinks, you should be able to just copy index.php and ignore .htaccess.

    If there is an index.html, index.htm, etc, in your root, delete that. Depending on your server setup, it may serve an html or htm page before a php one.

    As of now, it appears that you haven't copied index.php to root ( http://www.paralysisfromanalysis.com/index.php results in a 404).

    Hope that helps! Let us know!

Topic Closed

This topic has been closed to new replies.

About this Topic