• Resolved mmpresti

    (@mmpresti)


    I’m new at running wordpress on Windows 8. I usually run it on Linux but decided to install it also on my Windows partition. A few peculiarities struck me on successful install: I’m limited to using “localhost:(random port number)/wp-login.php” to login to the site, regardless of how I change my user privileges in mysql or how I change the values in the wp-config.php for DB_USER, DB_PASSWORD, DB_HOST, etc.

    The main problem here is I can’t connect to my public ip address. It would be fine if I could at least connect to the same random port that is being assigned to localhost, but I cannot connect at all with my public IP. I get “Bad Request: Invalid Host Name”. I’ve already allowed mysql through the firewall and made sure my public ip ports are open. Can anyone with experience help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mmpresti

    (@mmpresti)

    No one has any suggestions. Let me specify: In the wordpress table wp_options I can go ahead and change the ‘site url’ value to ‘localhost’ or my public ip and the ‘home’ value to the same, and when I relaunch the wordpress site the url will be rewritten from say ‘localhost/wp-login.php’ to ‘localhost/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%3A21329%2Fwp-admin%2F&reauth=1 . This will not successfully load the login page.

    Only when I specify in the table wp_options that the ‘site url’ and ‘home’ are both http://localhost:21329 do I get a successful login screen when I point my browser to localhost:21329/wp-login.php

    Somehow the redirect function in wp-login.php is caching the random port number 21329 and making this a condition of successfully logging in. Where do I change this?

    I’m limited to using “localhost:(random port number)/wp-login.php…
    …Somehow the redirect function in wp-login.php is caching the random port number 21329 and making this a condition of successfully logging in. Where do I change this?

    It’s not a WordPress issue. You have an issue peculiar to whatever web server software you’ve installed on Windows 8. Apache and IIS serve on port 80 right out of the box, and there is no randomization of port numbers for web root access. The same can be said for WampServer and XAMPP.

    Are you trying to make your site available using WebMatrix by any chance?

    Thread Starter mmpresti

    (@mmpresti)

    Yes, WebMatrix 3 was installed along with the rest of the packages recommended for WordPress in Web PI. I’m using WebMatrix to run the site on my IIS server. I have my home page running on port :80. I do not see why I am getting a random port number affixed to the wordpress site, although you are here suggesting that WebMatrix may be responsible. Why not run it a sub-directory of my website?

    When I install wordpress on Linux I usually make a symbolic link called ‘wordpress’ in a subdirectory of my website root to wherever the wordpress folder is (/usr/share/wordpress). I also must create an empty file in /etc/wordpress that is called ‘config-ip.ad.dr.ress.php’ . I have not had to do any of this on this present Windows installation. Yet it is up and running out of the box with WebMatrix 3.

    Is the normal install on Windows similar to Linux? Should I make a symbolic link in a subdirectory of my webpage root?

    I’ll try to keep this as short as possible and still have it make sense, but I apologize in advance if I fall short. Maybe someone will step in and correct me if I’m off the mark.

    To the best of my knowledge and exposure, WebMatrix is a development stack that uses IIS Express. I believe IIS Express may be in the habit of assigning random port number on start up within the context of the WebMatrix software. There may be some settings in WebMatrix where you can assign a port, but I believe it’s intended as a development/deployment environment and not a web server.

    When I install wordpress on Linux I usually make a symbolic link called ‘wordpress’ in a subdirectory of my website root to wherever the wordpress folder is (/usr/share/wordpress)…
    … I also must create an empty file in /etc/wordpress that is called ‘config-ip.ad.dr.ress.php

    That seems typical of a WordPress installation on Ubuntu/Debian where the installation is done using “apt-get install wordpress”, rather than installing it properly in the Apache web-root (/var/www). That’s why all of the issues with unnecessary symlinks and Debian-specific config files pop up. It’s an installation method I rarely ever recommend, and never use myself, even for local development. It’s a lot of time spent dealing with issues that have nothing to do with using WordPress.

    Is the normal install on Windows similar to Linux? Should I make a symbolic link in a subdirectory of my webpage root?

    No. I’m fairly confident all of your issues are a by-product of how you’re using WebMatrix. Perhaps some research and reading the documentation and some comparisons between WampServer, XAMPP, and WebMatrix might be helpful.

    Thread Starter mmpresti

    (@mmpresti)

    Ok, I got it working. I was making things a bit more complicated than they were, as you noticed that it was not necessary to symlink the wordpress directory. When I used to install on apache2 on Debian, I was always under the impression that there had to be a symlink for the install to work. Yet, the wordpress directory could be installed anywhere on the webserver.

    This is still a mystery to me: that when I was deploying the site through WebMatrix, with the site installed on a random port number, when opening that random port on my router and verifying that it was open remotely using a web check tool, I was still unable to access the site through my public ip (xx.xx.xx.xx:random port). I made sure everything was ‘open’ on the firewall but when I scanned my ip address with nmap, it was still showing that port closed. Hmmmm….

    Thanks for the clarification, ClaytonJames. Solved.

    Thread Starter mmpresti

    (@mmpresti)

    Upon a little further research, this is not so baffling: WebMatrix requires additional configuration for remote connections, so even if the ports were open, the platform would not be configured to make the connection on its own.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Windows install–localhost port number’ is closed to new replies.