WordPress.org

Ready to get started?Download WordPress

Forums

URL guessed using file paths incorrect (1 post)

  1. damian.smith
    Member
    Posted 5 months ago #

    Hey guys,

    I know there were some bugs fixed in 3.7 relating too how urls are guessed based on file paths, but one of these fixes seems to play up with our set up. Hopefully no one else has the same issue but here is the issue and fix if you need it.

    What happens is WordPress incorrectly picks up the '/shared' in
    the path to our site files. Apache is configured to point at
    /var/www/domain.co.uk/docs, but /var/www is a symlink to
    /shared/var/www. This makes the full path to the site files
    /shared/var/www/domain.co.uk/docs. WordPress's path
    manipulation is picking up the /shared from that path for
    some reason.

    So upon installation we get:

    http://www.domain.co.uk/shared/wp-admin/setup-config.php

    The way around this is too add WP_HOME and WP_SITEURL entries to your wp-config.php

    define('WP_SITEURL', 'http://www.domain.co.uk');
    define('WP_HOME', 'http://www.domain.co.uk');

    Hopefully this is a problem that can be resolved in the next version or two :)

Reply

You must log in to post.

About this Topic