Support » Installing WordPress » Installer issue – function wp_guess_url() guesses wrong

  • There seems to be a symlink-related issue with function wp_guess_url() in wp-includes/functions.php that causes the WordPress 3.7 installer script to create a wrong URL on the initial WordPress setup page on our webservers.

    Webserver setup:
    CentOS 5.10, Apache Version 2.2.24, PHP Version 5.3.26 (via custom suExec CGI), Apache Virtualhost DocumentRoot for “” is “/homepages/”, WordPress 3.7 installed in “/homepages/”.

    I can access WordPress in my browser under “” and see that it complains “There doesn’t seem to be a wp-config.php file.” However, the button “Create Configuration File” links to URL “”, but the URL should be “” (without “vrmd”).

    I guess the problem is that the “/homepages”-directory on our webservers is a symlink to “/vrmd/homepages” and the Apache DocumentRoot uses this symlink. The WordPress installer uses function wp_guess_url() to determine filesystem path and URL, and two different PHP functions are used to determine the path of the current script that return different results:

    dirname(__FILE__) returns “/vrmd/homepages/”
    dirname($_SERVER['SCRIPT_FILENAME'] returns “/homepages/”

Viewing 1 replies (of 1 total)
  • I had the same issue and submitted a ticket based on this… for now the way to resolve is too put

    define('WP_SITEURL', '');
    define('WP_HOME', '');

    into your wp-config.php

Viewing 1 replies (of 1 total)
  • The topic ‘Installer issue – function wp_guess_url() guesses wrong’ is closed to new replies.