#42993 closed enhancement (duplicate)
WordPress Multisite: Allow for different ports
Reported by: | Blackbam | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
The WordPress Codex says it is not possible to run WordPress on a different Port than Port 80 or Port 443. In times of Docker and complex development environment setups this is a real pain in the ass. Furthermore there are some common ports like 8080 which are not unusual for a webserver to use.
Please lets get rid of this completely unnecessary restriction on WordPress network installations. The following solutions seems to describe which parts of the Core have to be adapted:
https://benohead.com/wordpress-running-multisite-different-port/
https://wordpress.stackexchange.com/questions/212978/multisite-network-port-num-issues
Maybe there are one or to more things which must be changed, in order to get it to work properly.
Attachments (2)
Change History (10)
#1
@
7 years ago
- Keywords needs-patch added
- Type changed from enhancement to feature request
- Version changed from trunk to 3.0
#2
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Type changed from feature request to enhancement
#3
@
7 years ago
I just updated the patch also in order to maintain ports when editing site info ( Site Address (URL) ).
This ticket was mentioned in Slack in #core-multisite by enrico.sorcinelli. View the logs.
7 years ago
#5
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Thanks for the ticket @Blackbam and thanks for the patch @enrico.sorcinelli.
I'm going to close this out as a duplicate of #15936. The focus on IPv6 in that ticket is a little different, but goes hand in hand with arbitrary custom port numbers.
That ticket looks old and unfriendly, but I don't think anything is really holding it up more than a lack of activity. Please chime in with comments and patches there!
I was opening a similiar ticket for a patch I made for this.
The proposal patch adds
allowed_multisite_ports
new filter that allows to define differents ports in Multisite installs other than80
and443
. For example:I thought it was better to explicitly add differents ports instead of allow differents ports by default (or by defining constant like
define( MULTISITE_ALLOW_DIFFERENT_PORTS, true )
).PS: Currently I used filter for
sanitize_user()
(used inwpmu_create_blog()
) in order to allow ports in domain string, even if the best way would be to add asanitize_domain()
dedicated function since the first one allows also underscores.