WordPress.org

Ready to get started?Download WordPress

Forums

Alternate port setup (6 posts)

  1. SgtTravisT
    Member
    Posted 5 years ago #

    I've searched through the forums and haven't found anything that truly answers my question.

    I see that wordpress is designed to run only on one port. I wish that wasn't the case, but if it is, then so be it. What are the options that I have to access my site from internal computers easily (without adding a port number) while still allowing external access from a non-standard port.

    I have thought about port redirection at my router, but I don't think that will work properly. It doesn't seem possible to run wordpress on two ports, but that would be the ideal solution. Is there a way to modify the php/wp configs to allow this? Thanks,

    TravisT

  2. SgtTravisT
    Member
    Posted 5 years ago #

    Ok so after some suggestions from another site, I was wondering if anyone had tried using mod_rewrite or mod_proxy to accomplish what I am trying to do. Any suggestions would be great, as I have no idea how to configure either of these.

    TravisT

  3. John Godley
    Member
    Posted 5 years ago #

    WordPress is not designed to run on one port, it is designed to run inside a web server. As such you can configure the web server to listen to any ports you wish. It's kind of hard to say any further without knowing more details but you may want to look up virtual hosts.

  4. SgtTravisT
    Member
    Posted 5 years ago #

    Well the problem I'm coming across is that if I set my wordpress address/blog address on the Settings>General page to http://www.mydomain.com then when visitors view my site at http://www.mydomain.com:8000 and click a link on the site, the url is changed back to port 80 due to the "wordpress address" setting. I have my apache setup to listen on both ports, but the WP/blog address settings seem to be messing things up for me.

    Am I missing something here?

  5. elolatr
    Member
    Posted 4 years ago #

    Got similar problem.

    WordPress doesn't handle correctly port specified inside the url.
    example:

    https://example.com:8443/wordpress

    is redirected to port 443.
    On the very same server (lighttpd or Apache)

    https://example.com:8443/phpMyAdmin/

    is kept on port 8443.
    So the problem doesn't seems to be the http server.

    Apparently WordPress remove the port field from the url.
    So you ends up with the default ports 80 or 443 depending on the protocol http or https.

    Hunt for a workaround unsuccesful at this time.

  6. elolatr
    Member
    Posted 4 years ago #

    Just answering to myself, got it.

    In the Dashboard > Settings > General blog address
    Put inside the url the port you intend to use

    https://example.com:8443/wordpress/

    WordPress uses this one, not the one from the browser.
    In a way that's make sense.

    Resolved for me.

Topic Closed

This topic has been closed to new replies.

About this Topic