$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>localhost - Wordpress can't be reached on uWAMP when I change from port 80|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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/

Post a comment

comment list (0)

  1. No comments so far