localhost - Wordpress can't be reached on uWAMP when I change from port 80

admin2025-06-02  2

I can't use port 80 in my college and I need a mysql database and a version of wordpress for a college assignment. So when I change from port 80 to 801 (Or any port) I can't access Wordpress. I tried editing my Wp_config file, the wp_options database but each time wordpress defaults from localhost:801 back to localhost. Any ideas how to fix this? or another portable alternative to uWAMP? Any help would be appreciated.

I can't use port 80 in my college and I need a mysql database and a version of wordpress for a college assignment. So when I change from port 80 to 801 (Or any port) I can't access Wordpress. I tried editing my Wp_config file, the wp_options database but each time wordpress defaults from localhost:801 back to localhost. Any ideas how to fix this? or another portable alternative to uWAMP? Any help would be appreciated.

Share Improve this question edited Feb 21, 2019 at 17:55 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Feb 21, 2019 at 16:50 Anthony GallagherAnthony Gallagher 1 3
  • If you're running this on your local machine, you should be able to configure your system to respond to port 80. Let's assume that's not possible, though. WordPress does not care which port you use. It's your local apache configuration that cares. You may need to change your apache config to use a different port for this website. – MikeNGarrett Commented Feb 21, 2019 at 17:04
  • Thanks for the response. I have to demonstrate it running on the colleges machine, which won't allow port 80 access. I've been looking in my apache config for any reference to wordpress or port 80, but I can't see any. I'm not even sure what to look for. – Anthony Gallagher Commented Feb 21, 2019 at 17:40
  • Oh! Ok. I'll post an answer with more details. – MikeNGarrett Commented Feb 21, 2019 at 18:15
Add a comment  | 

1 Answer 1

Reset to default 0

Your apache config for this site should have something that looks like this:

<VirtualHost *:80>
    # The primary domain for this host
    ServerName example1
    # Optionally have other subdomains also managed by this Virtual Host
    ServerAlias example1 *.example1
    DocumentRoot /var/www/html/example1/public_html
    <Directory /var/www/html/example1/public_html>
        Require all granted
        # Allow local .htaccess to override Apache configuration settings
        AllowOverride all
    </Directory>
</VirtualHost>

To change the port Apache is listening to, modify the *:80 to the port of your choice.

To change the ports open to the public, you may need to change the configuration for your firewall other systems.

Here's a decent tutorial related to getting WordPress set up correctly: https://www.linode/docs/websites/cms/configure-apache-to-run-multiple-wordpress-sites-on-one-linode/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748879547a314484.html

最新回复(0)